query error
#1

Код:
[14:39:47] CMySQLHandler::Query(UPDATE player_accounts SET Army = '1', Swat = '1', AdminLevel = '0', WantedLevel = '8' Jail = '0', Score = '4', Bank = '0', WeaponSold = '0', RobSkill = '0.400000', Hit = '0', HitsCompleted = '0', Drugs = '0', ItemsSold = '0', AdminJail = '0', Money = '85172' WHERE SQLID = '2') - 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 'Jail = '0', Score = '4', Bank = '0', WeaponSold = '0', RobSkill = '0.400000', Hi' at line 1)
Код:
stock SavePlayer(playerid)
{
	format(String, sizeof(String), "UPDATE player_accounts SET Army = '%i', Swat = '%i', AdminLevel = '%i', WantedLevel = '%i' \
	Jail = '%i', Score = '%i', Bank = '%i', WeaponSold = '%i', RobSkill = '%f', Hit = '%i', HitsCompleted = '%i', Drugs = '%i', \
	ItemsSold = '%i', AdminJail = '%i', Money = '%i' WHERE SQLID = '%i'",
	PlayerInfo[playerid][Army], PlayerInfo[playerid][SWAT], PlayerInfo[playerid][AdminLevel], PlayerInfo[playerid][WantedLevel],
	PlayerInfo[playerid][Jail], GetPlayerScore(playerid), PlayerInfo[playerid][Bank], PlayerInfo[playerid][WeaponSold], PlayerInfo[playerid][RobSkill],
	PlayerInfo[playerid][Hit], PlayerInfo[playerid][HitsCompleted], PlayerInfo[playerid][Drugs], PlayerInfo[playerid][ItemsSold], PlayerInfo[playerid][AdminJail],
	PlayerInfo[playerid][Money], PlayerInfo[playerid][SQLID]);
	mysql_query(String);
}
Reply
#2

bump
Reply
#3

You have a comma (,) missing after WantedLevel = '%i'
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)