Couldn't you just use a Pager if you still want to use propel?

Something like:

$batchSize = 500;

$pager = new sfPropelPager('ModelClass', $batchSize);
$pager->setCriteria(new Criteria());

$keepGoing = true;
$currentPage = 1;

while($keepGoing)
{
  $pager->setPage($currentPage);
  $pager->init();

  foreach($pager->getResults() as $item)
  {
    ... process items ...
  }

  if($currentPage >= $pager->getLastPage())
  {
    $keepGoing = false;
  }
 
  $currentPage++;
}

That was typed from memory, but you get the idea.

Brian Racer
Jetpack LLC
http://jetpackweb.com

Eno wrote:
> On Nov 13, 8:10 am, Sumedh <[EMAIL PROTECTED]> wrote:
>
>   
>> Yeah...sorry about the foolish question...
>>
>> Actually, I am doing exactly that since beginning...I have used Creole
>> directly to fire queries and the used the resultset returned...I am
>> not hydrating using Propel at all...
>>     
>
> Maybe you could get a count first, then loop through them and do the
> query in smaller batches by setting a LIMIT in the SQL query?
>
>
> --
>
>
> >
>   

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to