Hi,
Use the auto_increment feature in mysql. See the create table documentation -
http://dev.mysql.com/doc/refman/5.1/en/create-table.html
create a real sequence as follows:
"""
now when you want to get the next number in the sequence do:
"""
the key here is that the sequence table is myisam, and so does not respect transactions. if you use a table that respects transactions, you will block when there are multiple transactions trying to get a sequence, whereas what you want is to just get a sequence.
Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+918866008962>
"Helping hands are better than praying lips......"