Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $rows = $connection->fetchAll($sql);//this row will return an array
- $collection = new Varien_Data_Collection();
- foreach($rows as $row){
- $rowObj = new Varien_Object();
- $rowObj->setData($row);
- $collection->addItem($rowObj);
- }
- $this->setCollection($collection);
- parent::_prepareCollection();
- return $this;
Add Comment
Please, Sign In to add comment