muneeba9071
02-08-2010, 06:21 AM
I have written a script, whenever a client clicks on "New Product" the script would do a mysql_query("INSERT INTO prods") to produce a new id, because this id is used in the page before the client clicks on save button.
Now, the client is asking that the id should be like 245, 246, 247 not to miss ids between the them, I really need your ideas, what should I do to produce id that is actually inserted, because I have also tried this:
$check_id = mysql_query("SELECT id FROM prods WHERE used = 'no' ORDER BY id DESC");
now this will give me the id which is not used, but what if a two clients access the same page?
Help guys!!:eek:
Now, the client is asking that the id should be like 245, 246, 247 not to miss ids between the them, I really need your ideas, what should I do to produce id that is actually inserted, because I have also tried this:
$check_id = mysql_query("SELECT id FROM prods WHERE used = 'no' ORDER BY id DESC");
now this will give me the id which is not used, but what if a two clients access the same page?
Help guys!!:eek: