This is doing the same thing, setting the page limit not the whole dataset
limit. I'll keep trying though


On Fri, May 27, 2011 at 12:04 PM, Marcus Silva
<[email protected]>wrote:

> This is how you can do it:
>
> $this->paginate['Account']['limit'] = 3;
> $this->paginate['Account']['order'] = 'RAND()';
> $this->paginate['Account']['conditions'] = array();
> $this->set('accounts',$this->paginate('Account'));
>
> Replace Account with the model name.  Thats how you do it in the
> controller.  If you want you can skip doing this all the time by
> simply declaring $paginate in the app controller.  In there you can
> list as many paginating default data you want.
>
> I hope its been helpful.
>
> cheers
>
> On May 26, 2:11 pm, Okalany Daniel <[email protected]> wrote:
> > Hi All,
> > i can't seem to be able to limit the number of records returned from
> cakephp
> > pagination.
> >
> > $this->paginate('limit'=>30);
> > limits the number of results per page. But i want to limit the total
> dataset
> > returned. Set it to like 300 since i have a very large table.
> >
> > regards,
> > Daniel
>
> --
> 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
> [email protected] For more options, visit this group
> at http://groups.google.com/group/cake-php
>



-- 
OKALANY DANIEL,
P.O BOX 26150,
Kampala.,
Uganda.
http://okasoft.net
--

-- 
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
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to