SA-MP Forums Archive
mysql update error - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: mysql update error (/showthread.php?tid=513105)



mysql update error - n00el - 14.05.2014

hy. its working for a long time, but i am start the server today, and its not working..
PHP код:
            mysql_format(sqldbquerysizeof(query), "UPDATE users SET death ='0', dx ='0', dy ='0', dz ='0', di ='0', WHERE nev ='%e'"GetName(playerb));
            
mysql_query(sqldbquery); 
PHP код:
[17:55:04] [DEBUGmysql_format connection1len1000format"UPDATE users SET death ='0', dx ='0', dy ='0', dz ='0', di ='0', WHERE nev ='%e'"
[17:55:04] [DEBUGmysql_query connection1query"UPDATE users SET death ='0', dx ='0', dy ='0', dz ='0', di ='0',"use_cachetrue
[17:55:04] [DEBUGCMySQLQuery::Execute starting query execution
[17:55:04] [ERRORCMySQLQuery::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 'WHERE nev ='Thommas_Cook'' at line 1 
why?


Re: mysql update error - Konstantinos - 14.05.2014

"... di ='0', WHERE nev ..." - there is a comma before WHERE clause.

Also you don't need apostrophes around integer values.


Re: mysql update error - n00el - 14.05.2014

thanks