SA-MP Forums Archive
Query Format - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Query Format (/showthread.php?tid=584044)



Query Format - N3cromancer - 02.08.2015

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

PHP код:
format(qSaveVehiclessizeof(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(ConexionqSaveVehicles""""); 
This is the error

PHP код:
[22:50:25] ======== MySQL ERROR =============
[
22:50:25UPDATE `vehiculosSET `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:25You have an error in your SQL syntaxcheck the manual that corresponds to your MySQL server version for the right syntax to use near ' = '0' WHERE `id` = '50'' at line 1 
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.


Re: Query Format - xVIP3Rx - 02.08.2015

replace
Код:
`color2`, = '%d'
with
Код:
`color2` = '%d'



Re: Query Format - N3cromancer - 02.08.2015

My eyes dont work fine atm.. Thanks for your help xVIP3Rx it work now ^^