Magento set order in collection


Magento set order in collection : You can set order in magento table as below.


Magento set order in collection Syntax

$collection = Mage::getModel('module_name/model_name')
->getCollection()
->setOrder('id DESC');

The above filter will sort magento collection by id in descending order.


User Ans/Comments

📖 Read More


Advertisements