problem in MySQL UPDATE
#1

does anybody know what is the problem ?

it doesn't save stats
and error is this :

Код:
[14:14:55] [ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`ID`=2' at line 1
[14:14:55] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError
my code :

PHP код:
stock SavePlayerStats(playerid)
{
    if(
pData[playerid][Logged] == false) return 1;
    new 
Qry[700];
    
mysql_format(mysqlQrysizeof(Qry), "UPDATE `accounts` SET `Admin`=%d\
                         , `Vip`=%d, `Money`=%d\
                         , `Score` =%d, `GangID` = %d\
                         , `GangLead` = %d, `InGang` =%d\
                         , `Jailed` = %d, `Jail_h` = %d\
                         , `jail_m` = %d, `capsoff` = %d\
                         , `house_o` = %d, `lockpick` = %d\
                         , `drugs` =%d, drugseeds=%d,Bank =%d\
                         , `fight` =%d, `kills` =%d , `deaths` = %d, `highspree` = %d\
                         , `p_hours` =%d\
                          WHERE `ID`=%d"
,
                         
pData[playerid][Admin],
                         
pData[playerid][Vip],
                         
GetCash(playerid),
                         
GetPlayerScore(playerid),
                         
pData[playerid][Gang_ID],
                         
pData[playerid][Gang_LEAD],
                         
pData[playerid][InGang],
                         
pData[playerid][Jailed],
                         
pData[playerid][H_Jailed],
                         
pData[playerid][M_Jailed],
                         
pData[playerid][Capsoff],
                         
pData[playerid][House_o],
                         
pData[playerid][LockPick],
                         
pData[playerid][Drugs],pData[playerid][DrugSeed],pData[playerid][Bank],
                         
pData[playerid][Fight],pData[playerid][Kills],pData[playerid][Deaths],pData[playerid][HIGH_SPREE],
                         
pData[playerid][hours],
                         
pData[playerid][p_ID]);
                          
mysql_tquery(mysqlQry"""");
                          return 
1;

Reply


Messages In This Thread
problem in MySQL UPDATE - by amirab - 05.03.2015, 10:13
Re: problem in MySQL UPDATE - by Misiur - 05.03.2015, 10:33
Re: problem in MySQL UPDATE - by amirab - 05.03.2015, 10:41

Forum Jump:


Users browsing this thread: 1 Guest(s)