On 3/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> As ad7six said, this should be handled in your db if at all possible.

I guess that's what the two of you are thinking when you say "handle inside
the db"  are stored procedures, right?  It's not possible because the database
is  MySql...

> 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
> }

Thanks.

I am perfectly clarified :  it is not possible to do exactly how i
hoped  ,  therefore i'll need to use a workaround.


Thanks you all,
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 [email protected]
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