Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
How to paginate limit the number of related items whith offset and limit?
  • Sorry for my english,I don't it understand verry well!
    I want to limit the number of items in the related tables for pagination!
    my query is that: Model_User::query()->where('id',1)->related('groups',array('limit'=>$limit,offset=>$offset))->get()
    My objective is to get $limit groups starting to offset of user tabe where id aqual 1!

    Thanks for some help!
  • If you use a related query, by default the limit is placed on the subquery to prevent incomplete results. If you don't care about that, use 'rows_limit' and 'rows_offset' instead.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion