Mysql Query Error
#1

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;
}
I get a mysql query error for this:
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.
Anyone notice a problem?
Reply


Messages In This Thread
Mysql Query Error - by Anthonyx3' - 11.01.2011, 02:46
Re: Mysql Query Error - by _rAped - 11.01.2011, 02:48
Re: Mysql Query Error - by Scenario - 11.01.2011, 02:53
Re: Mysql Query Error - by _rAped - 11.01.2011, 02:55
Re: Mysql Query Error - by Anthonyx3' - 11.01.2011, 03:06
Re: Mysql Query Error - by _rAped - 11.01.2011, 03:11
Re: Mysql Query Error - by Anthonyx3' - 11.01.2011, 03:14
Re: Mysql Query Error - by Retardedwolf - 11.01.2011, 03:16
Re: Mysql Query Error - by Anthonyx3' - 11.01.2011, 03:16
Re: Mysql Query Error - by _rAped - 11.01.2011, 03:16

Forum Jump:


Users browsing this thread: 2 Guest(s)