php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64209 mysqli.insert-id return autoincrement not insert id
Submitted: 2013-02-14 10:46 UTC Modified: 2013-02-14 12:48 UTC
From: grek at pogodzinach dot net Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.4.11 OS: ubuntu
Private report: No CVE-ID: None
 [2013-02-14 10:46 UTC] grek at pogodzinach dot net
Description:
------------
Hy 
mysqli.insert-id  = this is error / bug or 

please rename funcion mysqli.insert-id to mysqli.autoincrement-value

or add to mysqli.insert-id return primary row value 

- this func return 0 when primary value dont have auto increment 

Test script:
---------------
any , always ! 

Expected result:
----------------
return real insert id = primary rov value


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-02-14 12:48 UTC] johannes@php.net
-Status: Open +Status: Not a bug -Package: PHAR related +Package: MySQLi related
 [2013-02-14 12:48 UTC] johannes@php.net
"Insert ID" is a term used by MySQL. If you want to change this, ask Oracle to fix this in MySQL. There is no reason for PHP to use different terminology.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 15 09:01:26 2024 UTC