On 19-Jan-2003 Don Mc Nair wrote: > Thanks Guys > > I just needed a pointer. I decided to use the database and created two > tables, one for invoice number and one for order number then defined a > function to read the current number and the increment it. >
That'll work, but it's not atomic. At high traffic loads you can get duplicates. You might want to consider a table with a auto_increment field. Do a dummy insert, the get the value with : mysql_query('SELECT last_insert_id() as id'); Regards, -- Don Read [EMAIL PROTECTED] -- "Beer is proof that God loves us and wants us to be happy." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php