Updating Mysql (Str,Int,Flo)
#4

I would've done it like this:

pawn Код:
function updateCar(carEnum) {
  format(str, sizeof(str), "UPDATE `TableName` SET `OwnerName`='%s', `OwnerID` = %d, `PosX` = %f", carEnum[OwnerName], carEnum[OwnerID], carEnum[PosX]);
  execute_query(str);
}
You can then call the function like this: updateCar(ScriptCarInfo[car]);
Reply


Messages In This Thread
Updating Mysql (Str,Int,Flo) - by Larry123 - 24.02.2014, 10:32
Re: Updating Mysql (Str,Int,Flo) - by Vince - 24.02.2014, 11:11
Re: Updating Mysql (Str,Int,Flo) - by Larry123 - 24.02.2014, 11:27
Re: Updating Mysql (Str,Int,Flo) - by mamorunl - 24.02.2014, 11:37
Re: Updating Mysql (Str,Int,Flo) - by Larry123 - 24.02.2014, 11:40
Re: Updating Mysql (Str,Int,Flo) - by mamorunl - 24.02.2014, 12:39
Re: Updating Mysql (Str,Int,Flo) - by Misiur - 24.02.2014, 13:05

Forum Jump:


Users browsing this thread: 1 Guest(s)