mysql - Multiple column ORDERing in ZF? -
i got code
$select ->from(array("e" => "embarcacoes")) ->join(array("i" => "imagens"), 'e.id = i.barcoid') ->where("e.tipo = '{$this->view->tipoembarcacao}'") ->group("i.barcoid") ->limitpage($paginaatual, $porpagina) ->order('e.prioridade desc');
it works well, if change ->order('prioridade desc');
line ->order('id desc');
still works well, if try:
->order('prioridade desc, id desc'); or ->order(array('prioridade desc','id desc'));
it doesnt work. correct syntax make multiple orderign in zend framework? thanks.
got solution,
i have use this
->order(array('e.prioridade desc','e.id desc'));
oh christ, such beginner mistake.
Comments
Post a Comment