当进行join操作的时候Zend_Db_Table_Select会报一个异常"Select query cannot join with another table"
是因为Zend_Db_Table_Select会检查Select的表是不是来自于已定义的当前表,所以当进行Join操作的时候因为引入了其它表,所以会报错。
解决方法是把_integrityCheck设成false
$select = $this->select()->setIntegrityCheck(false);
这样再进行后续的join操作
$select = $select->from(.....)->joinLeft(.....)->where(.....)....
例如
$select = $this->select();
$select = $this->select()->setIntegrityCheck(false);
$select
->from('setting_force', '*')
->join('users', 'setting_force.ForceUser=users.Email');