|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-03-11 11:52 UTC] opendev at us dot ibm dot com
[2009-03-06 02:39 UTC] abhargav at in dot ibm dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
Description: ------------ lastInsertId always return 0 after call exec("INSERT ...") Reproduce code: --------------- When using $dbh->exec("INSERT INTO ... "); $dbh->lastInsertId(); //return always 0 // + good Error Info for any error (268, 691, ...) when using $stmt = $dbh->prepare("INSERT INTO ... "); $stmt->execute(); $dbh->lastInsertId(); //this work OK // + bad Error Info for error , how reported in bug#13115