$deal_m = Mage::getModel('dailydeals/deal')->load($deal_ids, 'deal_id');

I can understand this above code will get the values for deal_id=$deal_ids from the deal table.But I don't know the process or logic behind this ->load(),->getData().

Can any one please explain this process or suggest me any learning tutorials?

1 Answer 1


Well the load() method is a read from the database.

  • first parameter is the id
  • second parameter is the column that will be used as the identifier

In your case and assuming that it is a flat entity, the first line corresponds to something like this:

select * from dailydeals_table where deal_id = $deal_ids;

NB: I'm not sure what you table name exactly is, it's probably different than dailydeals_table

The getData() method returns the retrieved values as an array.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.