Updating Car [Mysql]
#1

Hello, iv'e been converting my gm to use mysql instead of flatfiles.

Everything is working perfect except this Car function.

pawn Код:
public UpdateCar(vehicleid)
{
    new string[256];
    if(Model != 0)
    {
        format(string, sizeof(string), "UPDATE cars SET model=%d, owner=%s, color1=%d, color2=%d, price=%d, locked=%d, x=%f, y=%f, z=%f, a=%f WHERE id ='%d'",Model,Owner,Color1,Color2,Price,Locked,X,Y,Z,A,vehicleid);
        mysql_query(string);
        printf("ID: %d - Model: %d - Owner: %s",vehicleid,Model,Owner);
        printf("Query: %s",string);
    }
    else
    {
    }
}
I always debug with print, and i can clearly see that the String gets formated.
heres an ss:



Can't see why the row dosn't get updates.

EDIT [FIX]:
Changing owner=%s to owner='%s' Fixed this shit thanks for helping.
Reply


Messages In This Thread
Updating Car [Mysql] - by Cameltoe - 14.08.2010, 21:43
Re: Updating Car [Mysql] - by armyoftwo - 14.08.2010, 21:44
Re: Updating Car [Mysql] - by superelite1 - 14.08.2010, 21:45
Re: Updating Car [Mysql] - by DiddyBop - 14.08.2010, 21:47
Re: Updating Car [Mysql] - by Cameltoe - 14.08.2010, 21:47
Re: Updating Car [Mysql] - by superelite1 - 14.08.2010, 21:49
Re: Updating Car [Mysql] - by DiddyBop - 14.08.2010, 21:51
Re: Updating Car [Mysql] - by superelite1 - 14.08.2010, 21:51
Re: Updating Car [Mysql] - by Cameltoe - 14.08.2010, 21:51
Re: Updating Car [Mysql] - by superelite1 - 14.08.2010, 21:54

Forum Jump:


Users browsing this thread: 1 Guest(s)