How to get single row collection in Magento.?

There are circumstances when you need to find single row collection in Magento. With this post we are going to study the syntax for it.

Get Single Row Collection In Magneto-

With this code you will be get Single row collection in Magento

$collection  = Mage::getModel('module/model')->getCollection();
              ->addFieldToFilter('column_name', $value)->getFirstItem();
              $data = $collection->getData();

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *