MySql error
#1

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

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`).
Reply
#3

Nvm got it , thanks for you help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)