Guest User

Untitled

a guest
Apr 24th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. $rows = $connection->fetchAll($sql);//this row will return an array
  2.  
  3. $collection = new Varien_Data_Collection();
  4.  
  5. foreach($rows as $row){
  6. $rowObj = new Varien_Object();
  7. $rowObj->setData($row);
  8. $collection->addItem($rowObj);
  9. }
  10.  
  11.  
  12.  
  13. $this->setCollection($collection);
  14. parent::_prepareCollection();
  15. return $this;
Add Comment
Please, Sign In to add comment