php.net |  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: -
Votes:19
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: Feature/Change Request
PHP Version: 5.1.6 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: waax at yahoo dot com
New email:
PHP Version: OS:

 

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

<?php
$stmt->execute();
print $stmt->getLastQuery();

?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Dec 06 20:01:24 2019 UTC