04.09.2014, 16:00
I have this error on the saving, I am trying to save the skin of the player. Cant see why it is wrong.
Error:
[17:56:57] [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 ''13' WHERE `Username` = 'Jason_Smith'' at line 1
Error:
[17:56:57] [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 ''13' WHERE `Username` = 'Jason_Smith'' at line 1
Код:
mysql_format(dbHandle,Query, sizeof(Query), "UPDATE `PlayerData` SET `pSkin` = '%d', `pLevel` = '%d', `pFaction` = '%d', `pFacRank` '%d' WHERE `Username` = '%s'", pInfo[playerid][pSkin], pInfo[playerid][pLevel], pInfo[playerid][pFaction], pInfo[playerid][pFacRank], pName(playerid)); mysql_query(dbHandle,Query,false);