26.01.2014, 22:48
Hello dear forum members..
I'm trying to update mysql to r34 from very very old one back in 2000.. So basically I have a question if this will work in my case of saving garage:
Here is the stock:
Thank you for your time...
With best regards Scrillex.
I'm trying to update mysql to r34 from very very old one back in 2000.. So basically I have a question if this will work in my case of saving garage:
pawn Код:
stock SaveGarages()
{
mysql_tquery(sql_handle, "SELECT * FROM Garages", "SaveGaragesData", "");
}
pawn Код:
forward SaveGaragesData(busid);
public SaveGaragesData(busid)
{
new query[1024];
format(query, sizeof(query), "UPDATE Garages SET EnterX=%f,EnterY=%f,EnterZ=%f,ExitX=%f,ExitY=%f,ExitZ=%f,EnterAngle=%f,ExitAngle=%f WHERE GarageID=%d",
Garages[busid][EnterX],
Garages[busid][EnterY],
Garages[busid][EnterZ],
Garages[busid][ExitX],
Garages[busid][ExitY],
Garages[busid][ExitZ],
Garages[busid][EnterAngle],
Garages[busid][ExitAngle],
busid);
mysql_tquery(query);
format(query, sizeof(query), "UPDATE Garages SET Owned=%d,Owner='%s',Price=%d,Interior=%d,Dynamic=%d,Open=%d WHERE GarageID=%d",
Garages[busid][Owned],
Garages[busid][Owner],
Garages[busid][Price],
Garages[busid][ExitInterior],
Garages[busid][Dynamic],
Garages[busid][Locked],
busid);
mysql_tquery(query);
}
With best regards Scrillex.