Nope, they definitely don't mean stored procedures. Cookxyz's answer would seem to be the most appropriate for what you're trying to do, in this case. It's how I'd do it, and it does avoid having several thousand records in memory at once... it may not be the optimal way in this case but we don't have a huge amount of detail on what you're attempting to do.
Hope this helps anyway... On Mar 9, 4:07 pm, "Adrian Maier" <[EMAIL PROTECTED]> wrote: > 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 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 -~----------~----~----~----~------~----~------~--~---