MySQL error
#1

Quote:

[23:10:01 02/03/18] [ERROR] CMySQLQuery::Execute[] - (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 'Lock = 0, State = 0 WHERE DoorDBID = 2' at line 1 (Query: "UPDATE door SET OwnerDBID = 1, FactionDBID = 0, Model = 1537, Lock = 0, State = 0 WHERE DoorDBID = 2")

Код:
mysql_format(ourConnection, threadSave, sizeof(threadSave), "UPDATE door SET OwnerDBID = %i, FactionDBID = %i, Model = %i, Lock = %i, State = %i WHERE DoorDBID = %i",
		DoorInfo[id][OwnerID],
		DoorInfo[id][FactionID],
		DoorInfo[id][Model],
		DoorInfo[id][Lock],
		DoorInfo[id][State],
		DoorInfo[id][DoorID]);
	mysql_tquery(ourConnection, threadSave);
Reply
#2

https://dev.mysql.com/doc/refman/5.7...5-7-detailed-L

I believe "Lock" is a reserved keyword. Try wrapping it in "`"
Reply
#3

Quote:
Originally Posted by Misiur
Посмотреть сообщение
https://dev.mysql.com/doc/refman/5.7...5-7-detailed-L

I believe "Lock" is a reserved keyword. Try wrapping it in "`"
Yes, "Lock" was the problem. Thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)