mysql syntax error
#4

you just missed a comma whatever it is " ' " in "`car_Mod3`= '%d "

try this
pawn Код:
stock SavePlayerVehicle(vehicleid)
{
    mysql_format(MainPipeline, szQuery, sizeof(szQuery), "UPDATE `playercars` SET `car_Owner` = '%s', `car_ModelID` = '%d', `car_Locked` = '%d', `car_Color1` = '%d', `car_Color2` = '%d'", pVeh[vehicleid][car_Owner], pVeh[vehicleid][car_ModelID], pVeh[vehicleid][car_Locked], pVeh[vehicleid][car_Color1], pVeh[vehicleid][car_Color2]);
    mysql_format(MainPipeline, szQuery, sizeof(szQuery), "%s, `car_X` = '%f', `car_Y` = '%f', `car_Z` = '%f', `car_A` = '%f', `car_World` = '%d', `car_Interior` = '%d', `car_Plate` = '%s'", szQuery, pVeh[vehicleid][car_X], pVeh[vehicleid][car_Y], pVeh[vehicleid][car_Z], pVeh[vehicleid][car_A], pVeh[vehicleid][car_World], pVeh[vehicleid][car_Interior], pVeh[vehicleid][car_Plate]);
    mysql_format(MainPipeline, szQuery, sizeof(szQuery), "%s, `car_Cash` = '%d', `car_Gun1` = '%d', `car_Gun2` = '%d', `car_Mats` = '%d', `car_Cocaine` = '%d', `car_Pot` = '%d', `car_Mod1` = '%d', `car_Mod2` = '%d'", szQuery, pVeh[vehicleid][car_Cash], pVeh[vehicleid][car_Gun1], pVeh[vehicleid][car_Gun2], pVeh[vehicleid][car_Mats], pVeh[vehicleid][car_Cocaine], pVeh[vehicleid][car_Pot], pVeh[vehicleid][car_Mod1], pVeh[vehicleid][car_Mod2]);
    mysql_format(MainPipeline, szQuery, sizeof(szQuery), "%s, `car_Mod3` = '%d', `car_Mod4` = '%d', `car_Mod5` = '%d', `car_Mod6` = '%d', `car_Mod7` = '%d', `car_Mod8` = '%d', `car_Mod9` = '%d', `car_Mod10` = '%d'", szQuery, pVeh[vehicleid][car_Mod3], pVeh[vehicleid][car_Mod4], pVeh[vehicleid][car_Mod5], pVeh[vehicleid][car_Mod6], pVeh[vehicleid][car_Mod7], pVeh[vehicleid][car_Mod8], pVeh[vehicleid][car_Mod9], pVeh[vehicleid][car_Mod10]);
    mysql_format(MainPipeline, szQuery, sizeof(szQuery), "%s, `car_Mod11` = '%d', `car_Mod12` = '%d', `car_Mod13` = '%d', `car_Mod14` = '%d', `car_Mod15` = '%d', `car_Mod16` = '%d', `car_Mod17` = '%d' WHERE `car_ID` = '%d'", szQuery, pVeh[vehicleid][car_Mod11], pVeh[vehicleid][car_Mod12], pVeh[vehicleid][car_Mod13], pVeh[vehicleid][car_Mod14], pVeh[vehicleid][car_Mod15], pVeh[vehicleid][car_Mod16], pVeh[vehicleid][car_Mod17], vehicleid);
    mysql_function_query(MainPipeline, szQuery, true, "OnQueryFinish", "i", THREAD_NO_RESULT);
    return 1;
}
Reply


Messages In This Thread
mysql syntax error - by Jack_Leslie - 03.04.2015, 11:14
Re: mysql syntax error - by JeaSon - 03.04.2015, 11:23
Re: mysql syntax error - by Jack_Leslie - 03.04.2015, 11:26
Re: mysql syntax error - by JeaSon - 03.04.2015, 11:33
Re: mysql syntax error - by Jack_Leslie - 03.04.2015, 11:35
Re: mysql syntax error - by Sithis - 03.04.2015, 11:35
Re: mysql syntax error - by BroZeus - 03.04.2015, 11:36
Re: mysql syntax error - by Vince - 03.04.2015, 14:35

Forum Jump:


Users browsing this thread: 2 Guest(s)