What does $getMembers aryay have? I have done it before where I just pass the array of id's only
Do your find get what you need then $data = $this->paginate( 'Member', array( 'Member.id' => $getMembers) ); $this->set( 'Members', $data ); Try that K -----Original Message----- From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf Of heohni Sent: Thursday, April 07, 2011 12:15 PM To: CakePHP Subject: Re: Paginate an array? Hi, I need to push this up, I still get in trouble with it. I select all my members with a find call: $getMembers = $this->Member->find('all', $findoptions); Then I loop through and make some checks and calculating stuff. At a certain point I am even deleting rows out of the array and do some sorting and re-arrangment stuff. After all, I want to give the $getMembers array to the view and I want to paginate it. All my data is finally stored in $getMembers. What can I do to pagine through the $getMembers Array? Thanks!! On 1 Apr., 18:33, "Krissy Masters" <naked.cake.ba...@gmail.com> wrote: > Something like: > > $this->paginate = $this->Model->__customPaging( $my_conditions);//function > just like any other find to return an array of data > $this->set( 'query', $this->paginate( 'Model' ) ); > > > > -----Original Message----- > From: cake-php@googlegroups.com [mailto:cake-php@googlegroups.com] On Behalf > > Ofheohni > Sent: Friday, April 01, 2011 10:50 AM > To: CakePHP > Subject: Paginate an array? > > Hi, > > I have a find() function to get some data. > The user has the chance to modfiy the data and all changes I keep in > an array. > Can I also give that array to the paginate function? As I want to > paginate through the users custom made data and not the original DB > result? Any ideas on that? > > Thanks and I wish everbody a nice and relaxing weekend! > > -- > Our newest site for the community: CakePHP Video Tutorialshttp://tv.cakephp.org > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > others with their CakePHP related questions. > > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php