How to print exact sql query in zend framework ?

前端 未结 14 2089
栀梦
栀梦 2020-12-07 09:33

I have the following piece of code which i taken from model,

    ...
                  $select = $this->_db->select()
                    ->from($th         


        
14条回答
  •  不知归路
    2020-12-07 10:31

    You can use Zend_Debug::Dump($select->assemble()); to get the SQL query.

    Or you can enable Zend DB FirePHP profiler which will get you all queries in a neat format in Firebug (even UPDATE statements).

    EDIT: Profiling with FirePHP also works also in FF6.0+ (not only in FF3.0 as suggested in link)

提交回复
热议问题