×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: bejoy balan
Added: Sep 10, 2014 12:46 PM
Views: 13
Magento , delete collection records , walk
  1.  $model = Mage::getModel('blendsmanager/blendscomponentsmodel');
  2.         try {
  3.  
  4.             $collection = $model->getCollection()->addFieldToFilter('blendsmanager_id', $blend_id);
  5.             $collection->walk("delete");
  6.         } catch (Exception $c) {
  7.             echo $c->getMessage();
  8.         }