mysql update error
#1

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?
Reply
#2

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

Also you don't need apostrophes around integer values.
Reply
#3

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)