format(query, sizeof(query), "UPDATE accounts SET Name = '%s', Password = '%s', Cash = %d, Admin = %d, Kills = %d, Deaths = %d, Skin = %d, DriversLic = %d, Mute = %d WHERE Faction = %d LIMIT 1", GetName(playerid), PlayerInfo[playerid][pPass], GetPlayerMoney(playerid), PlayerInfo[playerid][pAdmin],
PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pSkin], PlayerInfo[playerid][pDriverslic], PlayerInfo[playerid][pMute], PlayerInfo[playerid][pFaction]);
mysql_query(query);
[20:15:22] CMySQLHandler::Query(UPDATE accounts SET Name = 'Death', Password = 'test', Cash = 2000, Admin = 10, Kills = 0, Deaths = 9, Skin = 285, DriversLic = 0, Mute = 0 WHERE Faction = ) - 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 '' at line 1) [20:15:22] >> mysql_query( Connection handle: 1 ) [20:15:22] CMySQLHandler::Query(UPDATE accounts SET Color = 0, Accent = 'none', PosX = '1543.220458', PosY = '-1628.804443', PosZ = '13.382812, Angle = '0.000000', Interior = 0 WHERE Virtual-) - 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 '0.000000', Interior = 0 WHERE Virtual-' at line 1)
[21:37:01] CMySQLHandler::Query(UPDATE accounts SET 'Name' = 'death', 'Password' = 'test', 'Cash' = '2000', 'Admin' = '10', 'Kills' = '1', 'Deaths' = '9', 'Skin' = '285', 'DriversLic' = '1', 'Mute' = '1' WHERE 'Faction' = '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 ''Name' = 'death', 'Password' = 'test', 'Cash' = '2000', 'Admin' = '10', 'Kills' ' at line 1)
I've changed anything that was 'NULL' to a defult number (I.e - 1). I have used quotation marks around the variables yet I still having the same problems.
![]() EDIT: Код:
[21:37:01] CMySQLHandler::Query(UPDATE accounts SET 'Name' = 'death', 'Password' = 'test', 'Cash' = '2000', 'Admin' = '10', 'Kills' = '1', 'Deaths' = '9', 'Skin' = '285', 'DriversLic' = '1', 'Mute' = '1' WHERE 'Faction' = '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 ''Name' = 'death', 'Password' = 'test', 'Cash' = '2000', 'Admin' = '10', 'Kills' ' at line 1) |
new query[200];