Because you didn't say, I have to assume you are using MySQL as your database.
It is my understanding that an Auto Increment of a primary key field is single threaded, such that if you do an insert, followed by mysql_insert_id () to get the number inserted. Anything else, that I can think of, will cause you to have to do locks in some way. Please let me know if you have found this to not be true. Warren Vail Tools, Metrics & Quality Processes (415) 667-7814 Pager (877) 774-9891 215 Fremont 02-658 -----Original Message----- From: Matt Babineau [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 25, 2002 10:59 AM To: 'Php-Win (E-mail)' Subject: [PHP-WIN] Single threading a database call I am making a call to a database to update a record incrementing the number in the field. When I put some load on this page, I get it returning the same number sometimes. This is unacceptable. because under heavier load people will be receiving the same number and it will not count the correct amount of page views. Is there any type of locking I can use to make sure that the operation is single threaded? Matt Babineau Freelance Internet Developer e: <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] p: 603.943.4237 w: <http://www.illuminatistudios.com/> http://www.illuminatistudios.com -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php