07.02.2014, 19:58
MySql Help
Hello,
I have encounter a problem on updating my MySql. I've been converting from Y_INI to MySql recently after a change off mind. I'm not really experienced, but I am still learning it. I have came here for some help. I have searched SA-MP forums, but the post I found, were pointless.

pawn Код:
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)