This Page

This component allows to Phalcon\Mvc\Model returns large resulsets with the minimum memory consumption Resulsets can be traversed using a standard foreach or a while statement. If a resultset is serialized it will dump all the rows into a big array. Then unserialize will retrieve the rows as they were before serializing.

<?php//Using a standard foreach$robots=Robots::find(array("type='virtual'","order"=>"name"));foreach($robotsas$robot){echo$robot->name,"\n";}//Using a while$robots=Robots::find(array("type='virtual'","order"=>"name"));$robots->rewind();while($robots->valid()){$robot=$robots->current();echo$robot->name,"\n";$robots->next();}