help with mysql check - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help with mysql check (
/showthread.php?tid=286986)
help with mysql check -
ajwar - 01.10.2011
pawn Код:
Total_Veh_Created++;
new CHECKquery[128];
format(CHECKquery,128,"SELECT Model FROM `veh` WHERE vID = %i",Total_Veh_Created);
mysql_query(CHECKquery);
mysql_store_result();
if(mysql_num_rows() >= 1)
{
// id exists
mysql_free_result();
return 1;
}
mysql_free_result();
When i use this code i need to pickuppickup several times to get empty id, what can i use instead of single Total_Veh_Created++; to get the empty id direkt. vID field has unique key
Re: help with mysql check -
MadeMan - 01.10.2011
Why do you need the empty id? To create a new vehicle?