As ad7six said, this should be handled in your db if at all possible.
Assuming thats not possible, use limit and page arguments to work on a
small subset of the data at one time.  First execute a count to find
out how many records your dealing with, then loop through each subset.
Something like this:

$count = findCount($conditions);
$page = 0;
$limit=20; //set limit to any size, even 1
               //this is how many records you will have in memory at
any given time.

while(($page*$limit) < $count){
        $page++;
        $recs = findAll($conditions, $fields, $order, $limit, $page,
$recursive);
        //now use a function call ror foreach to process your records
}

Good Luck,
cook

On Mar 9, 9:38 am, "Adrian Maier" <[EMAIL PROTECTED]> wrote:
> On 3/9/07, Sergei <[EMAIL PROTECTED]> wrote:
>
>
>
> > cant you just try it?
>
> > -1 will fetch ONLY the fields of current model table, without any
> > associated data.
>
> Oh, I understand what you mean.   We are speaking of
> different things :  you are telling me how to get no data at all.
> While I want all the data , but in small chunks. Not all data
> at once.
>
> --
> Adrian Maier


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

Reply via email to