|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #39287 PDO: Get last executed query
Submitted: 2006-10-28 03:26 UTC Modified: 2021-10-27 12:48 UTC
Avg. Score:4.7 ± 0.7
Reproduced:14 of 14 (100.0%)
Same Version:2 (14.3%)
Same OS:2 (14.3%)
From: waax at yahoo dot com Assigned:
Status: Open Package: PDO related
PHP Version: 5.1.6 OS:
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 — but make sure to vote on the bug!
Your email address:
Solve the problem:
41 + 20 = ?
Subscribe to this entry?

 [2006-10-28 03:26 UTC] waax at yahoo dot com
Getting the last executed query would be helpful for debugging. Something like:

print $stmt->getLastQuery();



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-29 03:48 UTC] fcardinaux at gmail dot com
Such a feature would be useful for profiling as well. 

The software profiler I use transforms each SELECT statement into an EXPLAIN SELECT, which cannot work unless the parameters are replaced by the values used when the query is executed.
 [2021-10-27 12:48 UTC]
-Package: Feature/Change Request +Package: PDO related
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 05 13:01:33 2024 UTC