mySQL problem
#1

pawn Код:
format(sql, sizeof(sql), "INSERT INTO vehicles (Model, Owner, Locked, Lock, Alarm, Insurance, Color1, Color2, Plate, vX, vY, vZ, Owned) VALUES (%d, '%s', 0, 0, 0, 1, 0, 0, '%s', 1182.9319, -1324.0872, 13.5783, 1)", model, GetName(playerid, false), "LosSantos");
                        mysql_query(sql);
[/pawn]

It won't insert for some reason, help please!
Reply
#2

Show us your mysql log using mysql_debug(1); on OnGameModeInit.
Reply
#3

Lock is a reserved word, i believe this is your problem. This is why its considered good practice to surround column and table names with ` and `. You should definitely get in the habit of doing that.


Код:
INSERT INTO `vehicles` (`Model`, `Owner`, `Locked`, `Lock`, `Alarm`, `Insurance`, `Color1`, `Color2`, `Plate`, `vX`, `vY`, `vZ`, `Owned`) VALUES (%d, '%s', 0, 0, 0, 1, 0, 0, '%s', 1182.9319, -1324.0872, 13.5783, 1)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)