Tag Archives: Magento get single row collection not working

Magento get single row collection


Magento get single row collection : You Can Get Single row collection as below.


Magento get single row collection Syntax

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

Which will load single row.

Magento 2 get Collection First Item