note 47119 added to function.mysqli-insert-id
| From: | alanatcommondreamdotnet at osu1 dot php dot net | Date: | Wed, 03 Nov 2004 19:44:00 +0000 |
| Subject: | note 47119 added to function.mysqli-insert-id | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-79562@lists.php.net to get a copy of this message | ||
I was having problems with getting the inserted id, and did a bit of testing. It ended up that if
you commit a transaction before getting the last inserted id, it returns 0 every time, but if you
get the last inserted id before committing the transaction, you get the correct value.
----
Manual Page -- http://www.php.net/manual/en/function.mysqli-insert-id.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+47119
Delete -- http://master.php.net/manage/user-notes.php?action=delete+47119&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+47119&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+47119&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+47119&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+47119&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+47119&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+47119&report=yes
Search -- http://master.php.net/manage/user-notes.php