Error in my SQL syntaxes, don't see anything
#1

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
Reply
#2

pawn Код:
,VehiclePanels`,
try the new mysql_format
Reply
#3

Thanks for finding the mistake, looking to fast >,>

I'll try that format later
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)