MySQL error ID: 1064 (License plate)
#1

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)