ID: 25075
Updated by: [EMAIL PROTECTED]
Reported By: hans at nyphp dot org
Status: Open
Bug Type: Documentation problem
Operating System: All
PHP Version: Irrelevant
New Comment:
I just had a test :
// code
mysql_query('insert into foo values (1)'); // foo have 2 fields, first
one is an auto_increment
var_dump(mysql_insert_id());
// output
Column count doesn't match value count at row 1
int(0)
>From the documentation : "mysql_insert_id() returns 0 if the previous
query does not generate an AUTO_INCREMENT value."
The documentation seems okay. bogus bug ?
Mehdi
Previous Comments:
------------------------------------------------------------------------
[2003-08-13 08:21:11] hans at nyphp dot org
Description:
------------
It's recently come to my attention that the documentation for the
mysql_insert_id wasn't indicating the correct return behavior of the
function. I double checked this with a small C program, and found the
results to be the same. Finally, after raising this issue with the
MySQL folks, they indicated this was a documentation error. The
correct behavior is indicated at:
http://lists.mysql.com/list.php?3:mss:9598:200308:ikdgphkkkddmffiinjik
Thanks,
Hans
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25075&edit=1
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php