|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #52137 pdo_dblib does not implement lastInsertId
Submitted: 2010-06-22 04:58 UTC Modified: 2010-06-22 05:00 UTC
From: Assigned: ssufficool (profile)
Status: Closed Package: PDO related
PHP Version: trunk-SVN-2010-06-22 (SVN) OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
26 + 50 = ?
Subscribe to this entry?

 [2010-06-22 04:58 UTC]
sql server and sybase have @@IDENTITY function to return the last inserted id from a table but this is not implemented in pdo_dblib

Test script:
echo $pdo->lastInsertId()

Expected result:
a number

Actual result:
throws not implemented


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-22 04:59 UTC]
Automatic comment from SVN on behalf of ssufficool
Log: Fix bug #52137 - implement lastInsertId
 [2010-06-22 05:00 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: ssufficool
 [2010-06-22 05:00 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

Fixed in revision 300647.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Jan 18 23:03:14 2022 UTC