Magento Module Development Series – Part7 – Database and SQL Operations

In this blog we will see advanced operations in model and collection, to execute complex sql queries. We will look into collections and details of resource models.

First let’s look at model and collection architecture in magento. If you look at a magento model class it extends Mage_Core_Model_Abstract which intern extends Varien_Object. Continue reading

Magento Module Development Series – Part12 – Collection and SQL Operations

In the previous blog post, we had seen the how to do various sql query in a mysql resource file. In this blog post we will see how to work with magento collection and doing various operations with collections.

In this section, we will look in all the various sql operations on collections. Collections are also very important when working on admin grids. Continue reading