Any one have a example how to order before group with leftjoin in zend paginator adapter ?
new Zend_Paginator_Adapter_DbSelect($this->db->select()
->from(array( 'a' => $this->prefix.'contest' ), array('id'))
->joinLeft(array( 'b' => $this->prefix.'logo_to_contest'),'a.id=b.contest_id', array('img'))
->group('a.id')
->order('a.end','a.date_start DESC','b.id RAND()')
)
From mysql manuel
and in the syntax description group comes before order so it has nothing to do with zend
it’s mysql that requires that you put group before order.
However to get around this issue and group after ordering you can select with a subquery with order then group on a new select like :