MySQL Selection fails
#6

Why you choosed to use this method?

mysql_function_query(connection, query, true, "SetPlate", "dd", playerid, GetPlayerVehicleID(playerid));

You did by some tutorial or just decided it will be better as this?


I would go as this:
(First off I wouldn't use GetPlayerVehicleID(playerid) for mysql, but would use a unique carid for DB, as if you change some cars IG, your whole table goes wasted. )

pawn Код:
new Plate[10],veh = GetPlayerVehicleID(playerid);
format(query, sizeof(query), "SELECT `Plate` FROM `car` WHERE `tID` = '%d'",veh );
mysql_query(query);
mysql_store_result();
mysql_fetch_field("Plate",Plate);
mysql_free_result();
SetVehicleNumberPlate(veh ,Plate);
Just for god sake don't use loop, if you use this method.
Reply


Messages In This Thread
MySQL Selection fails - by Sk1lleD - 24.12.2013, 13:26
Re: MySQL Selection fails - by arakuta - 24.12.2013, 14:35
Re: MySQL Selection fails - by Sk1lleD - 24.12.2013, 14:48
Re: MySQL Selection fails - by Sk1lleD - 24.12.2013, 15:33
Re: MySQL Selection fails - by Sk1lleD - 26.12.2013, 10:43
Re: MySQL Selection fails - by ikey07 - 26.12.2013, 11:50
Re: MySQL Selection fails - by Sk1lleD - 26.12.2013, 13:39
Re: MySQL Selection fails - by Sk1lleD - 26.12.2013, 13:57
Re: MySQL Selection fails - by Sk1lleD - 26.12.2013, 14:42

Forum Jump:


Users browsing this thread: 8 Guest(s)