set data through model in magento

if you want to save your data in your custom model through setData(). than follow below process to save your data in custom model.


$values  = array('TABLE_COLUM_NAME_1'=>'TABLE_COLUM_Vaule_1','TABLE_COLUM_NAME_2'=>'TABLE_COLUM_Vaule_2',...);
              
 $tracking = Mage::getModel('YOUR_MODEL_PATH'); // your model object                
 $tracking->setData($values);
 $tracking->save();

Now see your value in your table.
                or
 If you want to show save current value, than use this
 print_r($tracking-getData());

Solve setData error problem in magento Click Here

No comments:

Post a Comment