08.09.2013, 20:55
There is GetFreeID
Quote:
stock GetFreedID() { for(new i=1; i<MAX_CARS; i++) { format(cquery,sizeof(cquery),"SELECT * FROM cars WHERE `cID` = %d LIMIT 1",i); mysql_function_query(dbHandle, cquery, false, "",""); mysql_store_result(); if(mysql_num_rows() == 0) { mysql_free_result(); return i; } mysql_free_result(); } return 0; } |