Doc #69400 [NEW]: Wrong documentation for mysqli insert_id
| From: | imbacen at gmail dot com | Date: | Wed, 08 Apr 2015 23:43:18 +0000 |
| Subject: | Doc #69400 [NEW]: Wrong documentation for mysqli insert_id | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-12122@lists.php.net to get a copy of this message | ||
From: imbacen at gmail dot com
Operating system: any
PHP version: Irrelevant
Package: *General Issues
Bug Type: Documentation Problem
Bug description:Wrong documentation for mysqli insert_id
Description:
------------
---
From manual page: http://www.php.net/mysqli.insert-id
---
The documentation for mysqli insert_id is wrong. It says that function
will return zero if query was not INSERT or UPDATE but in fact it will
return the last inserted ID. The function seems to be just a wrapper for
http://php.net/manual/en/function.mysql-insert-id.php
where the
documentation is correct and even warns that the value is NOT reset
after each query.
See discussion:
http://stackoverflow.com/questions/29526374/mysqli-insert-id-still-returning-a-value-even-after-select-queries
Test script:
---------------
See:
http://stackoverflow.com/questions/29526374/mysqli-insert-id-still-returning-a-value-even-after-select-queries
Expected result:
----------------
It should state the same as docs for mysql_insert_id()
--
Edit bug report at https://bugs.php.net/bug.php?id=69400&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69400&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69400&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69400&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69400&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69400&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69400&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69400&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69400&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69400&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69400&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69400&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69400&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69400&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69400&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69400&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69400&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69400&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69400&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69400&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69400&r=mysqlcfg