We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

orderBy DBA with more columns

Hello to everyone, i wanna order a query like:

$query->orderBy('id ASC');

Thats working fine also a order like with more columns is working like that

$query->orderBy(array('id','email'));

but when i am trying to make something like that, i get an error that there is an error.

$query->orderBy(array('id ASC','email DESC'));

i was looking at the phalcon docs but cannot find anything about it. thanks for your help. pat

$query->orderBy('id ASC, email DESC');