简体   繁体   中英

Get SQL after Zend\Db\Sql\Select

I'm on zend framework 2.

The scenario is, I want to know the actual SQL query after Zend\\Db\\Sql\\Select . I cannot use Zend\\Db\\Sql\\SQL here, and

$select = new Zend\Db\Sql\Select();
$select->where(array($between));
$select->prepareStatement($select)->getSQL();

is giving error like,

Call to a member function getParameterContainer() on null

What is the correct way to write it?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM