SA-MP Forums Archive
MySQL error ID: 1064 (License plate) - 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 ID: 1064 (License plate) (/showthread.php?tid=417531)



MySQL error ID: 1064 (License plate) - dusk - 21.02.2013

Line:
pawn Код:
format(query,sizeof(query),"INSERT INTO `vehicles` (owner,model,Nr,x,y,z,r,Dauzta,LPlate,Locked,EngineHealth,PanelHealth,DoorHealth,LightsHealth,TiresHealth,Locks,Alarm,Insurance,CColor1,CColor2,Spawned) VALUES ('%s',%d,%d,%f,%f,%f,%f,0,'%s',0,1000.0,0,0,0,0,0,0,0,%d,%d,0)",\
        Name,tmp,tmp2,x,y,z,angle,VehicleInfo[playerid][LPlate],cl1,cl1);
error:
pawn Код:
[18:27:30] CMySQLHandler::Query(INSERT INTO `vehicles` (owner,model,Nr,x,y,z,r,Dauzta,LPlate,Locked,EngineHealth,PanelHealth,DoorHealth,LightsHealth,TiresHealth,Locks,Alarm,Insurance,CColor1,CColor2,Spawned) VALUES ('Enrico_Mancini',560,5,-193.959091,959.895690,17.414093,7.206744,0,'DAN) - 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 ''DAN' at line 1)
The problem is with the license plate. It used to be fine...then i moved it some stuff there and there now it doesn't work. anyone knows why?


Re: MySQL error ID: 1064 (License plate) - Vince - 21.02.2013

Your string is much too short. But have you considered using default values in your database?


Re: MySQL error ID: 1064 (License plate) - dusk - 22.02.2013

Now i did! Thanks,i always forget the easiest way