开发者

How can I see the SQL statements which go to the database when using PDO?

开发者 https://www.devze.com 2022-12-14 19:44 出处:网络
How can I see the开发者_运维百科 SQL statements which go to the database when using PDO?If you are using MySQL, enable the query log?I don\'t know how to do this with bare PDO, but if you wrap PDO in

How can I see the开发者_运维百科 SQL statements which go to the database when using PDO?


If you are using MySQL, enable the query log?


I don't know how to do this with bare PDO, but if you wrap PDO in a Zend_Db_Adapter, then you can use Zend_Db_Profiler.

Then you'll be able to see the parameterized queries, together with the parameter values. Also, its profiling, i.e. measuring the query execution times.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号