Closed sharkstate closed 2 years ago
Hello sharkstate,
By default, the "order" method shows the data in ascending order. Anyway, you can make your ordering explicit.
$listProducts = $query->select('*')
->from('table')
->range('0-0')
->order('color.asc') //or "color.desc"
->execute()
->getResult();
Hope this helps!
Ive used the QueryBuilder to order the results like so:
Which gives me the first result ordering by 'color' descending. How can I do the same thing but ascending?
Thanks!