Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Relation Orderby
  • if I have to model "food" and "invitation". 
    food has_many invitation 
    invitation belongs_to food.

    can I use Model_Food:find('$id) but the result is ordered by (order_by) `invitation.id` ?

    thank you
     
  • found it

    Model_Food::find($id,array(
    'related'=>array('invitation'),
    'order_by'=>array('invitation.id');
    ));

Howdy, Stranger!

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

In this Discussion