SQL Query Failure
#4

First of all use what arakuta says in create table ... Color_1 TINYINT(3) default 0, Color_2 TINYINT(3) default 0 ... rest, then you dont need in insert color_1 and color_2

result
pawn Код:
format(query, sizeof(query),"INSERT INTO `ownedcars` (`spawnid`, `Model`, `Location_X`, `Location_Y`, `Location_Z`, `Angle`, `Owned`, `Paintjob`, `SecurityCode`) VALUES ('%d', '%d', '%f', '%f', '%f', '%f', '%s', '999', '%d')", sid, vmodel, x, y, z, angle, sname, strval(pass));
Second

pawn Код:
query = "INSERT INTO `ownedcars` (`spawnid`, `Model`, `Location_X`, `Location_Y`, `Location_Z`, `Angle`, `Color_1`, `Color_2`, `Owner`, `Owned`, `Locked`, `PlateSet`, `Plate`, `Paintjob`, `Virtualworld`, `Component0`, `Component1`, `Component2`, `Component3`, `Component4`";
strcat(query,",`Component5`, `Component6`, `Component7`, `Component8`, `Component9`, `Component10`, `Component11`, `Component12`, `Component13`, `SecurityCode`) VALUES");
format(query, sizeof(query),"%s('%d', '%d', '%f', '%f', '%f', '%f', '0', '1', '1', '%s', '1', '1', '0', '0', '999', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '%d')", query, sid, vmodel, x, y, z, angle, sname, strval(pass));
Reply


Messages In This Thread
SQL Query Failure - by UnknownGamer - 02.10.2013, 00:13
Re: SQL Query Failure - by arakuta - 02.10.2013, 00:17
Re: SQL Query Failure - by UnknownGamer - 02.10.2013, 00:19
Re: SQL Query Failure - by Jefff - 02.10.2013, 00:24
Re: SQL Query Failure - by xganyx - 02.10.2013, 03:17
Re: SQL Query Failure - by UnknownGamer - 02.10.2013, 04:39

Forum Jump:


Users browsing this thread: 1 Guest(s)