//salesperson is a custom model in magento $pagenum=5;// pagenumber which you data want $pagesize=10;// how many data display on a page $collection=Mage::getModel('salesperson/salesperson')->getCollection(); $collection->addFieldtoFilter('phone2',array('eq'=>''));// condition for filter data $collection->setCurPage($pagenum); $collection->setPageSize($pagesize); foreach($collection as $t){ echo $t->geCity(); }
Be the first to comment.