Roberto Ramirez Sat Aug 31 17:16:10 -0400 2013

Subject: paginating results

Is there any plugin to do the pagination of results?

Thanks,


Caleb Brewer Tue Oct 08 21:32:39 -0400 2013

Hey Roberto,
I'm not expert on the stuff and by now I hope you've gotten this question answered, but those two things aside I thought I'd post a reply for others who are curious. You can do pagination by using the limit and offset options in the finder:

Book::find('all', array('limit' => 10));
Book::find('all', array('limit' => 10, 'offset' => 5));

This info is in the wiki @ http://www.phpactiverecord.org/projects/main/wiki/Finders#limit-offset

(1-1/1)