[PHP] question on getting PDO to output final assembled query from prepared statements?
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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] question on getting PDO to output final assembled query from the prepared statements
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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Set PDO to ALWAYS return fetched rows with PDO::FETCH_ASSOC?
I am trying to go through the PDO documentation to set up PDO to always use PDO::FETCH_ASSOC instead of being forced to include this attribute on each and every fetch call. Can anyone tell me if there is a setAttribute value I can set when I create the db connection handler that I reuse throughout my code? Thanks Rick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php