MySQL Problem
#8

pawn Код:
forward MySQLUpdateCityCar(playerid);
public MySQLUpdateCityCar(playerid) // by Brown
{
    new query[512];
    new owner[32], description[32], plate[32];
    new vehid = GetPlayerVehicleID(playerid);
    samp_mysql_real_escape_string(CityCarInfo[vehid][cOwner], owner);
    samp_mysql_real_escape_string(CityCarInfo[vehid][cDescription], description);
    samp_mysql_real_escape_string(CityCarInfo[vehid][cPlate], plate);
        new currentveh = GetPlayerVehicleID(playerid);
    format(query, sizeof(query), "UPDATE `citycars` SET x = '%f', y = '%f', z = '%f', a = '%f', color1 = '%d', color2 = '%d', fraction = '%d', Plate ='%s', Owner='%s', Description='%s', Value = '%d', Owned = '%d' , Lock = '%d', Ownable = '%d' WHERE id = '%d'",
    CityCarInfo[vehid][cXPos],
    CityCarInfo[vehid][cYPos],
    CityCarInfo[vehid][cZPos],
    CityCarInfo[vehid][cAngle],
    CityCarInfo[vehid][cColorOne],
    CityCarInfo[vehid][cColorTwo],
    PlayerInfo[playerid][pLeader],
    plate,
    owner,
    description,
    CityCarInfo[vehid][cValue],
    CityCarInfo[vehid][cOwned],
    CityCarInfo[vehid][cLock],
    CityCarInfo[vehid][cOwnable],
    vehid);
    samp_mysql_query(query);
    return 0;
}
You were forgetting the ' ' between the variables.
Somewhere you had them added, somewhere not.
Reply


Messages In This Thread
MySQL Problem - by GeorgeBrown - 30.08.2011, 22:19
Re: MySQL Problem - by GeorgeBrown - 02.09.2011, 08:39
Re: MySQL Problem - by [HiC]TheKiller - 02.09.2011, 08:46
Re: MySQL Problem - by wouter0100 - 02.09.2011, 08:48
Re: MySQL Problem - by [HiC]TheKiller - 02.09.2011, 08:51
Re: MySQL Problem - by wouter0100 - 02.09.2011, 08:53
Re: MySQL Problem - by GeorgeBrown - 02.09.2011, 09:17
Re: MySQL Problem - by [MWR]Blood - 02.09.2011, 09:57
Re: MySQL Problem - by GeorgeBrown - 02.09.2011, 10:23
Re: MySQL Problem - by [MWR]Blood - 02.09.2011, 10:25

Forum Jump:


Users browsing this thread: 1 Guest(s)