Multiple Conditions with Left Join in Zend Framework
问题 I am facing an issue while working with Zend Framework. Basically I am trying to add an AND operator in a sub query using Left join. Please see the following qyery that my code is producing, SELECT d .*, count(status) FROM deal AS d LEFT JOIN payments ON payments .deal_id = d .deal_id GROUP BY d . deal_id ORDER BY created_date desc Code is: $select = $this->_db->select() ->from(array('d'=>'deal')) ->joinLeftUsing('payments', 'deal_id', array('count(status)')) ->order("created_date $sortOrder"