MySql 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 error (
/showthread.php?tid=355813)
MySql error -
CoDeZ - 01.07.2012
After Following the killer mysql tutorial i get this error
Код:
CMySQLHandler::Query(SELECT IP FROM 'playerdata' WHERE User = 'CoDeZ' LIMIT 1) - An error has occured. (Error ID: 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 ''playerdata' WHERE User = 'CoDeZ' LIMIT 1' at line 1)
And here is my Query
pawn Код:
new Query[200],p_Name[24];
MoneyGiven[playerid] = -1;
GetPlayerName(playerid,p_Name,24);
format(Query , sizeof(Query), "SELECT IP FROM 'playerdata' WHERE User = '%s' LIMIT 1",p_Name);
Help pl0x
Re: MySql error -
Vince - 01.07.2012
Table and field names may be left unwrapped, but if you choose to wrap them you must use backticks (`). You should actually only use backticks if the table or field name is a MySQL keyword (for example `update`).
Re: MySql error -
CoDeZ - 01.07.2012
Nvm got it , thanks for you help