note 22467 added to function.mysql-insert-id
| From: | tph dot kanters at wanadoo dot nl | Date: | Wed, 19 Jun 2002 08:48:52 +0000 |
| Subject: | note 22467 added to function.mysql-insert-id | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-32005@lists.php.net to get a copy of this message | ||
As a reply on robert-ramsey@uiowa.edu yes that is true. If you want to be safe you have to give the
resource_link_identifier with the call to mysql_insert_id().
You will see that if you don't supply this in many cases you will still see the right
behaviour. The case you described is an example which shows how it can go wrong. This scenario
probably has a very slim chance of ever occuring in a website with marginal traffic however, since
the calls to mysql_query() and mysql_insert_id() in a page will probably excecuted only a few milli
seconds after each other. But better play it on the safe side ;).
Greets,
Timothy
--
http://www.php.net/manual/en/function.mysql-insert-id.php
http://master.php.net/manage/user-notes.php?action=edit+22467
http://master.php.net/manage/user-notes.php?action=delete+22467
http://master.php.net/manage/user-notes.php?action=reject+22467