02.08.2015, 03:32
Hi guys i update my save vehicle system everything was working good after add the "paintjob" column in the query, i can't see the error there
This is the error
cInfo[i][paintjob] is storing the paint job correctly, but idk why can't save it on the database, paintjob is INT not null on vehicles table.
PHP код:
format(qSaveVehicles, sizeof(qSaveVehicles), "UPDATE `vehiculos` SET `x` = '%f', `y` = '%f', `z` = '%f', `r` = '%f', `gasolina` = '%d', `paintjob` = '%d', `color1` = '%d', `color2`, = '%d' WHERE `id` = '%d'", cInfo[i][c_x], cInfo[i][c_y], cInfo[i][c_z], cInfo[i][c_r], vGasolina[i], cInfo[i][paintjob], cInfo[i][color1], cInfo[i][color2], cInfo[i][db_id]);
mysql_tquery(Conexion, qSaveVehicles, "", "");
PHP код:
[22:50:25] ======== MySQL ERROR =============
[22:50:25] UPDATE `vehiculos` SET `x` = '125.047691', `y` = '124.705718', `z` = '2.203393', `r` = '46.872299', `gasolina` = '198', `paintjob` = '-1', `color1` = '0', `color2`, = '0' WHERE `id` = '50'
[22:50:25] 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 ' = '0' WHERE `id` = '50'' at line 1