Re: transaction locking

From: Date: Fri, 05 Dec 2003 13:17:44 +0000
Subject: Re: transaction locking
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-31910@lists.php.net to get a copy of this message
Aleks Kalynovych wrote:
I have a couple forms that generate a unique ID based on taking the highest number in the ID column adding 1 to its value. The problem is that I don’t save that number until the form is submitted. If 2 or more persons fill out the form at the same time they all get the same ID number. I hope that there are some suggestions on how to accomplish this with a better method
What database are you using? Pretty much all of them have a method for generating these numbers internally. Consult your documentation. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.com

« previous php.db (#31910) next »