MYSQL error #1064
#1

Hello everyone Whenever I restart the server it only saves houses from 1 to 9. and it shows me this error in mysql logs:
Код:
[ERROR] CMySQLQuery::Execute[OnHouseSaved] - (error #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
This is my query
Код:
mysql_format(mysql, query, sizeof(query), "UPDATE `houses` SET ExteriorX = %f, ExteriorY = %f, ExteriorZ = %f, InteriorX = %f, InteriorY = %f, InteriorZ = %f, ExteriorVW = %d, ExteriorInt = %d, InteriorVW = %d, InteriorInt = %d, Owner = '%e', Owned = %d, Price = %d, Locked = %d, Slot = %d, Sale = %d, CustomInt = %d, CustomExt = %d, Safe = %d, Fridge = %d WHERE `ID` = '%d'", ....
This is where I call OnHouseSaved:
Код:
mysql_format(mysql, query, sizeof(query),"SELECT `ID` FROM `houses` WHERE `ID` = '%d' LIMIT 1", houseid);
I tried so hard but I couldn't see where is the problem...I bet it's something stupid though like a missing "," or a "`".
Reply
#2

I've seen exactly the same error that did not show the code but only '' and it was problem with the length of the query so increase it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)