How to find out if a record already exists in a database or not in Magento ?


To check out whether record exists in the database of MAGENTO you can use the following query:::

getCollection()->addFieldToFilter('field_name', $value_to_check)->getFirstItem();
   // if record found in database
    if record not found in database


Above if else condition checks if the record exists in database or not.

That's it!

Read the guidelines for Technology + Write For Us + Guest Post Category and send blog at