[MySQL] House System - Errors
#1

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);
	}
}
Reply
#2

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

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)

Reply
#4

^Bumb^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)