question on getting PDO to output final assembled query from prepared statements?
| From: | Rick Harding | Date: | Wed, 07 Jun 2006 17:44:42 +0000 |
| Subject: | question on getting PDO to output final assembled query from prepared statements? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-237566@lists.php.net to get a copy of this message | ||
I am working on some code that I am moving to use PDO in order to play with it a bit. I used to use ADODB, but want to try out the
performance of using PDO and just skipping some of the portability of the db code. The one thing I find myself missing is the ADODB debug and sql values where you can get out the last query executed (with $dbh->sql) and a dump of queries as they are executed (with $dhb-
debug = true). Can anyone suggest how I can get this functionality into my code with PDO? I want to be able to just set a debug flag in a config file for the project and get a dump of all SQL queries executed output to the page as it loads. I'm not sure what the best method to extend/wrap PDO calls to do this as I don't see any way in the PDO functionality to do it now.Thanks for the tips/help Rick