note 69716 added to function.mysql-insert-id
| From: | squezy16 at hotmail dot com | Date: | Sun, 17 Sep 2006 15:46:11 +0000 |
| Subject: | note 69716 added to function.mysql-insert-id | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-117263@lists.php.net to get a copy of this message | ||
One of the problem of the LAST_INSERT_ID function is that it may return an old Auto_Increment number
if the INSERT did not have the time to run properly while the mysql_insert_id always returns the
good value. I tried to insert a row imidiatly followed by a select LAST_INSERT_ID and it kept on
returning me the LAST_INSERT_ID before my insert statement.
----
Server IP: 66.163.161.117
Probable Submitter: 74.56.221.232
----
Manual Page -- http://www.php.net/manual/en/function.mysql-insert-id.php
Edit -- https://master.php.net/note/edit/69716
Del: integrated -- https://master.php.net/note/delete/69716/integrated
Del: useless -- https://master.php.net/note/delete/69716/useless
Del: bad code -- https://master.php.net/note/delete/69716/bad+code
Del: spam -- https://master.php.net/note/delete/69716/spam
Del: non-english -- https://master.php.net/note/delete/69716/non-english
Del: in docs -- https://master.php.net/note/delete/69716/in+docs
Del: other reasons-- https://master.php.net/note/delete/69716
Reject -- https://master.php.net/note/reject/69716
Search -- https://master.php.net/manage/user-notes.php