Question

I have a kohana 3.0.12 based website and I want to get the first 3 values from the database, then the following 3. I know that in Kohana v2.3.x it could be done using find_all(1,3) method, so I have tried:

$restricted_footer_links = ORM::factory('static')->get_in_footer_restricted()->find_all(1,3);

but it retrieves all the values, like I would have done with find_all(). Any idea of how I can get a range of the multiple records in Kohana 3.0.12?

Was it helpful?

Solution

You can mix ORM with DB Query Builder:

$restricted_footer_links = ORM::factory('static')->get_in_footer_restricted()->limit(1)->offset(3)->find_all();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top