Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 zend 框架,我是新手。建立的站点有很多与 mysql 之间的交易,并且有很多错误。有什么方法可以理解 Zend Framework 的查询吗?如果我能看到它们,我可以轻松地更改它们,但不幸的是我没有找到如何做到这一点。谢谢!
ZF 中的查询是 Zend_Db_Select 的实例,简单地说
$query = Zend_Db_Table::getDefaultAdapter()->select()->from('user')->where('id = ?',1);
要查看其 sql 表示,只需执行
echo $query ; or echo $query->__toString();