How to enable SQL output to log file with Zend_Db?

2019-03-02 16:50发布

问题:

I wonder if this possible with Zend_Db, but I am looking for something like SQL query logging similar to how Hibernate does it, where it shows you what SQL it generates in the log file.

回答1:

You can use Zend_Db_Profiler for this task.

Tutorial Zend Framework 1.6 with Profiler and FireBug