(error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for t
#1

My code:
Code:
format(query,sizeof(query),"UPDATE players SET Admin='%d' , Money='%d' , Skin='%d' , X='%f' , Y'%f' , Z='%f' , Angle='%f'",pInfo[playerid][Admin], pInfo[playerid][Money], pInfo[playerid][Skin], pInfo[playerid][Pos][0], pInfo[playerid][Pos][1], pInfo[playerid][Pos][2], pInfo[playerid][Pos][3]);
    mysql_function_query(Connection,query,false,"","");
Error:
Code:
[10:52:56] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE players SET Admin='0' , Money='99500' , Skin='0' , X='149", callback: "(null)", format: "(null)"
[10:52:56] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[10:52:56] [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 ''-67.215164' , Z='1.429687' , Angle='269.999969'' at line 1
[10:52:56] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError
Reply
#2

You forgot the WHERE clause in your query.
Reply
#3

Thank you buddy, REP+
Reply
#4

Also, why do you put integers between quotes('%d')?

just put them as %d.

ONLY put strings between single quotes, like: '%s'
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)