SA-MP Forums Archive
[MySQL] House System - Errors - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [MySQL] House System - Errors (/showthread.php?tid=221513)



[MySQL] House System - Errors - DVDK - 05.02.2011

Hello guys,

I update my house system to MySQL in multiple parts, but i get this error in my MySQL log:

Quote:

[18:25:41] CMySQLHandler::Query(UPDATE rpg_houses SET Int='5',Vir='0',Class='10',Price='0',Locked='1',Bo ught='0',Owner='0',Used='0' WHERE ID='39') - 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 'Int='5',Vir='0',Class='10',Price='0',Locked='1',B ought='0',Owner='0',Used='0' WH' at line 1)

And this is the script i'm using:

Код:
SaveHouses()
{
    CheckMySQL();
    new string[256];
	for(new i; i < CurrentHouses; i++)
	{
		format(string, sizeof(string), "UPDATE rpg_houses SET Int='%d',Vir='%d',Class='%d',Price='%d',Locked='%d',Bought='%d',Owner='%s',Used='%d' WHERE ID='%d'",House[i][Int],House[i][Vir],House[i][Class],House[i][Price],House[i][Locked],House[i][Bought],House[i][Owner],House[i][Used],i);
		mysql_query(string);
	}
}



Re: [MySQL] House System - Errors - Johnny_Xayc - 05.02.2011

"UPDATE `rpg_houses` SET Int=%d,Vir=%d,Class=%d,Price=%d,Locked=%d,Bought=% d,Owner='%s',Used=%d WHERE ID=%d'"


Re: [MySQL] House System - Errors - DVDK - 05.02.2011

Nope, still the same:

Quote:

[23:17:44] CMySQLHandler::Query(UPDATE `rpg_houses` SET Int=5,Vir=0,Class=10,Price=0,Locked=1,Bought=0,Own er='0',Used=0 WHERE ID=39) - 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 'Int=5,Vir=0,Class=10,Price=0,Locked=1,Bought=0,Ow ner='0',Used=0 WHERE ID=39' at line 1)




Re: [MySQL] House System - Errors - DVDK - 06.02.2011

^Bumb^