SA-MP Forums Archive
Mysql error 1064 - 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)
+--- Thread: Mysql error 1064 (/showthread.php?tid=512532)



Mysql error 1064 - AnthonyIta - 11.05.2014

I have this error:

Код:
[10:06:31] [DEBUG] mysql_tquery - scheduling query "UPDATE `house` SET enter_x='1482.148803', enter_y='-1589.184692', enter_z='13.382812', enter_angle='312.686218', enter_interior"..
[10:06:31] [DEBUG] CMySQLQuery::Execute[SendQuery()] - starting query execution
[10:06:31] [ERROR] CMySQLQuery::Execute[SendQuery()] - (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
[10:06:31] [DEBUG] CMySQLQuery::Execute[SendQuery()] - error will be triggered in OnQueryError
[10:06:31] [DEBUG] CMySQLQuery::Execute[SendQuery()] - data being passed to ProcessCallbacks()
[10:06:31] [DEBUG] CMySQLQuery::~CMySQLQuery() - deconstructor called
code:
pawn Код:
format(query, sizeof(query), "UPDATE `house` SET enter_x='%f', enter_y='%f', enter_z='%f', enter_angle='%f', enter_interior='%d', enter_world='%d' WHERE id='%d'",
        HouseInfo[id][EnterX],
        HouseInfo[id][EnterY],
        HouseInfo[id][EnterZ],
        HouseInfo[id][EnterAngle],
        HouseInfo[id][EnterInterior],
        HouseInfo[id][EnterWorld],
        HouseInfo[id][HouseId]);
Help is much appreciated.


Re: Mysql error 1064 - Jstylezzz - 11.05.2014

How big is the size of the query string? I can't find any problems with the query itself, so maybe the string size is too short. Try increasing it and see what happens.


Re: Mysql error 1064 - AnthonyIta - 11.05.2014

Quote:
Originally Posted by Jstylezzz
Посмотреть сообщение
How big is the size of the query string? I can't find any problems with the query itself, so maybe the string size is too short. Try increasing it and see what happens.
Thanks!!