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(sqldb, query, sizeof(query), "UPDATE users SET death ='0', dx ='0', dy ='0', dz ='0', di ='0', WHERE nev ='%e'", GetName(playerb));
mysql_query(sqldb, query);
PHP код:
[17:55:04] [DEBUG] mysql_format - connection: 1, len: 1000, format: "UPDATE users SET death ='0', dx ='0', dy ='0', dz ='0', di ='0', WHERE nev ='%e'"
[17:55:04] [DEBUG] mysql_query - connection: 1, query: "UPDATE users SET death ='0', dx ='0', dy ='0', dz ='0', di ='0',", use_cache: true
[17:55:04] [DEBUG] CMySQLQuery::Execute - starting query execution
[17:55:04] [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 '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