Reputation: 586
i got this 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 i change the ->order('prioridade DESC');
line to ->order('id DESC');
it still works well, but if i try:
->order('prioridade DESC, id DESC'); or ->order(array('prioridade DESC','id DESC'));
it doesnt work. What is the correct syntax to make multiple orderign in zend framework? Thanks.
Upvotes: 5
Views: 5776
Reputation: 586
Got the solution,
i have to use like this
->order(array('e.prioridade DESC','e.id DESC'));
oh christ, such a beginner mistake.
Upvotes: 17