Magento Certified Developer GuideCategory: 4. DatabaseWhich methods exist to influence the ordering of the result set for flat table collections? How do the methods differ?
Manish Prakash Staff asked 5 years ago

$collection->setOrder()
This takes two parameters 1. field name 2. DESC/ASC

we can also do

$collection->getSelect()->order()
here we can specify an array of fields