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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: grek at pogodzinach dot net
New email:
PHP Version: OS:

 

 [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

Add a Patch

Pull Requests

Add a Pull Request

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 May 07 19:01:29 2024 UTC