11.12.2014, 05:15
Hi everyone, I am having a problem with a Quert in MySQL.
Error.
23:56:11] [DEBUG] mysql_format - connection: 1, len: 128, format: "UPDATE `users` SET `Admin` =`%d`, `Money`=`%d`, WHERE `ID`=`%d`"
[23:56:11] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `users` SET `Admin` =`0`, `Money`=`0`, WHERE `ID`=`0`", callback: "(null)", format: "(null)"
[23:56:11] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[23:56:11] [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 `ID`=`0`' at line 1
[23:56:11] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError
[23:56:11] [DEBUG] Calling callback "OnQueryError"..
Code for where the error is.
Any ideas? Thanks!
Error.
23:56:11] [DEBUG] mysql_format - connection: 1, len: 128, format: "UPDATE `users` SET `Admin` =`%d`, `Money`=`%d`, WHERE `ID`=`%d`"
[23:56:11] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `users` SET `Admin` =`0`, `Money`=`0`, WHERE `ID`=`0`", callback: "(null)", format: "(null)"
[23:56:11] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[23:56:11] [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 `ID`=`0`' at line 1
[23:56:11] [DEBUG] CMySQLQuery::Execute[] - error will be triggered in OnQueryError
[23:56:11] [DEBUG] Calling callback "OnQueryError"..
Code for where the error is.
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new query[128];
mysql_format(mysql, query, sizeof(query), "UPDATE `users` SET `Admin` =%d, `Money`=%d, WHERE `ID`=%d",pInfo[playerid][Admin], pInfo[playerid][Money],pInfo[playerid][ID]);
mysql_tquery(mysql, query, "", "");
return 1;
}