php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #23989 mysql_insert_id() stopped working in this release! Fatal!!! Please fix.
Submitted: 2003-06-03 11:01 UTC Modified: 2003-06-08 06:59 UTC
Votes:3
Avg. Score:3.7 ± 1.9
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: doug at gfx dot com Assigned:
Status: Not a bug Package: PEAR related
PHP Version: 4.3.2 OS: WIndows XP, Linux
Private report: No CVE-ID: None
 [2003-06-03 11:01 UTC] doug at gfx dot com
$sql="INSERT INTO table (data) VALUES ('fred')";
$r=$db->query($sql);
$myindex=mysql_insert_id();


$myindex is null!!!!! This has worked up to and including 4.3.1. My code has not changed.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-08 06:59 UTC] georg@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Don't use reserved words for tablenames or quote them in backticks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 11 06:01:28 2024 UTC