#47979 [Opn->Csd]: mysqli_insert_id return mixed, not int
| From: | fa@php.net | Date: | Tue, 21 Apr 2009 00:36:34 +0000 |
| Subject: | #47979 [Opn->Csd]: mysqli_insert_id return mixed, not int | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-2116@lists.php.net to get a copy of this message | ||
ID: 47979
Updated by: fa@php.net
Reported By: surfchen at gmail dot com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: Mac OSX
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2009-04-16 03:33:42] surfchen at gmail dot com
Description:
------------
mysqli_insert_id return string when the result greater than the
max_value of signed int. But the document
http://www.php.net/manual/en/mysqli.insert-id.php
says it return int,
not mention the possibility of returning string.
Reproduce code:
---------------
CREATE TABLE
bigint_test (
id bigint(20) NOT NULL auto_increment,
vv varbinary(100) default NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM AUTO_INCREMENT=8589934592;
$l->query('INSERT INTO bigint_test (vv) values ("ii")');
var_dump($l->insert_id);
Expected result:
----------------
mixed mysqli_insert_id ( mysqli $link )
Actual result:
--------------
int mysqli_insert_id ( mysqli $link )
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47979&edit=1