• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Donation system

Status
Not open for further replies.

Faraonekkk

New Member
Joined
Feb 15, 2010
Messages
686
Reaction score
4
I need a function that'll add "premEnd" in "accounts"
i got

mysql_query("UPDATE `players` SET `vocation` = 1 WHERE `id` = '".$players."';")
/\
simple but not work ;s



please help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
Last edited:
nobody knows what youre asking for
are you looking for a LUA function to do this or are you just looking for a simple SQL query to run in ur db?

by the look of it I'm guessing LUA function
change mysql_query for db.query

don't bump unless 24 hours have passed either, youre thread could be deleted
 
I am talking about buypoints.php

$user = 'root'; #NAZWA USERA
$pass = 'xxxxxx'; #password to to BAZY
$db = 'namebase'; #NAZWA BAZY

$m = mysql_connect($host, $user, $pass);
if (!$m) {
} else {
db.query("UPDATE accounts SET premium_points='".$newPoints."' WHERE id='".$account."'");
$message = "<font color='red'><b>You have gained XX premium account!</b></font>";
}
}
[/QUOTE]


Understand me?
HEEEEEEEEEEELP PLEASEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE!
 
Last edited:
That is a mix of lua and php haha...

Try replacing:

PHP:
db.query("UPDATE accounts SET premium_points='".$newPoints."' WHERE id='".$account."'");

For:

PHP:
$SQL->query("UPDATE accounts SET premium_points=".$newPoints." WHERE id='".$account."")->fetch();
 
Fatal error: Call to a member function query() on a non-object

Line 57
$SQL->query("UPDATE accounts SET premium_points=".$newPoints." WHERE id='".$account."")->fetch();


Maybe its not adding because its don't know to what account it should give... hmm, any idea ? also thanks for reply :P
 
try
LUA:
$SQL->query("UPDATE accounts SET premium_points=".$newPoints." WHERE id='".$account."")->fetch;
or
LUA:
$SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` $newPoints WHERE `id` = \"".$account."\"";
 
You should try if the variables are the ones that wont work, use this:

Code:
mysql_query("UPDATE accounts SET premium_points = 5 WHERE id = 1");

Now check account with ID 1 and see if it have 5 premium points, if not then something is wrong with your script..

In case it does have 5 premium points, then the problem is on your variables "newpoints" and "account".
 
try
LUA:
$SQL->query("UPDATE accounts SET premium_points=".$newPoints." WHERE id='".$account."")->fetch;
or
LUA:
$SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` $newPoints WHERE `id` = \"".$account."\"";

\"".$account."\""
Sweet jesus, why!?

If you want to quote something then just use $SQL->quote or w.e it is on gesior
PHP:
$SQL->exec('UPDATE accounts SET premium_points='.$newPoints.' WHERE id='.$account_logged->getId());
This will avoid retarding everything up.

Edit: I just read some of the posts and it appears that you don't even have POT or some shit
 
Last edited:
You should try if the variables are the ones that wont work, use this:

Code:
mysql_query("UPDATE accounts SET premium_points = 5 WHERE id = 1");

Now check account with ID 1 and see if it have 5 premium points, if not then something is wrong with your script..

In case it does have 5 premium points, then the problem is on your variables "newpoints" and "account".


Tryed and not added :S its really a problem with newpoints and account ..

to SlurpDerp
its not gesior and any other acc, its mine acc based on Nicaw and i am almost done with this :P
 
Okay, its work, really thanks for SlurpDerp, Bintzer, Kito2, Kekox and Cronoxs
I have did donation system!

Close this thread.
 
Status
Not open for further replies.
Back
Top