11.01.2011, 02:46
pawn Код:
function SavePlayerStats(playerid)
{
format(str, sizeof(str), "UPDATE `Users` SET `Money` = '%d', `Gender` = '%d', `ppos_x` = '%d', `ppos_y` = '%d', `ppos_z` = '%d', `Level` = '%d' ` WHERE `user` = '%s'",UserStats[playerid][Money], UserStats[playerid][Gender],UserStats[playerid][ppos_x],UserStats[playerid][ppos_y],UserStats[playerid][ppos_z],UserStats[playerid][Level],pName(playerid));
mysql_query(str);
return 1;
}
pawn Код:
[Mon Jan 10 22:47:19 2011] Function: mysql_query executed: "UPDATE `Users` SET `Money` = '0', `Gender` = '1', `ppos_x` = '0', `ppos_y` = '0', `ppos_z` = '0', `Level` = '0' ` WHERE `user` = 'Tyrone_Williamss'" with result: "1".
[Mon Jan 10 22:47:19 2011] Error (0): Failed to exeute query. 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 `user` = 'Tyrone_Williamss'' at line 1.