The popularity of Magento lies in its ability for customization and flexibility to fulfil the business requirements.
One such example below is the code to insert record in database in Magento.
It allows inserting a record in the table in Magento 1. For example, you created a table named “Test”. Now you want to insert record in that already created table.
Insert data in the table in Magento, easily, using the below solution:
Method to insert record in database in Magento:
$model = Mage::getModel('modulename/modelname'); $model->setData($yourData); $model->save();
That’s it.
Please share the solution with Magento community via social media.
Thank you.