Error in my SQL syntaxes, don't see anything - 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: Error in my SQL syntaxes, don't see anything (
/showthread.php?tid=270202)
Error in my SQL syntaxes, don't see anything -
Jochemd - 19.07.2011
Hello,
pawn Код:
format(QueryString,sizeof(QueryString),"INSERT INTO `VehicleInfo` (`ID`,`VehicleModel`,`VehicleColor`,`VehicleOwner`,`VehiclePosX`,`VehiclePosY`,`VehiclePosZ`,`VehicleAngle`,`VehicleFuel`,`VehicleDoors`,VehiclePanels`,`VehicleLights`,`VehicleTires`,`VehicleHealth` ) VALUES ('%d','%d','%d','%s','219.3414','-243.8810','1.5889','270.0','100','0.0','0.0','0.0','0.0','1000.0')",fileid,CarshopInfo[v][ModelID],vColor,Playername(playerid));
mysql_query(QueryString);
So I got this in my script, and it sends the query to my database. The log gives this:
Код:
CMySQLHandler::Query(INSERT INTO `VehicleInfo` (`ID`,`VehicleModel`,`VehicleColor`,`VehicleOwner`,`VehiclePosX`,`VehiclePosY`,`VehiclePosZ`,`VehicleAngle`,`VehicleFuel`,`VehicleDoors`,VehiclePanels`,`VehicleLights`,`VehicleTires`,`VehicleHealth` ) VALUES ('1','478','3','Jeff Venturas','219.3414','-243.8810','1.5889','270.0','100','0.0','0.0','0.0','0.0','1000.0')) - 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 '`,`VehicleLights`,`VehicleTires`,`VehicleHealth` ) VALUES ('1','478','3','Jeff V' at line 1)
I don't see any mistake?
Jochem
Re: Error in my SQL syntaxes, don't see anything -
Donya - 19.07.2011
try the new mysql_format
Re: Error in my SQL syntaxes, don't see anything -
Jochemd - 19.07.2011
Thanks for finding the mistake, looking to fast >,>
I'll try that format later