06.02.2012, 12:14
pawn Код:
format(largestr, sizeof(largestr), "INSERT INTO `vehicles` (\
`id`, `model`, `posX`, `posY`, `posZ`, `posAngle`, `interior`, `world`, `color1`, `color2`, `owner`, `locked`, `price`) VALUES(\
%d, %d, %f, %f, %f, %f, %d, %d, %d, %d, '%s', 0, 0",
GetVehicleFreeID(), VE[v][model], VE[v][posX], VE[v][posY], VE[v][posZ], VE[v][posAngle], VE[v][interior], VE[v][world], VE[v][color1], VE[v][color2], VE[v][owner]
);
mysql_query(largestr);
PHP код:
CMySQLHandler::Query(INSERT INTO `vehicles` (`id`, `model`, `posX`, `posY`, `posZ`, `posAngle`, `interior`, `world`, `color1`, `color2`, `owner`, `locked`, `price`) VALUES(0, 402, -131.423782, 1097.003295, 19.593750, 310.252044, 0, 0, 0, 1, 'Government', 0, 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 '' at line 1)