Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Where clause on 2 Models
  • Hello, quick question about ORM. I have a Model_Match that has many Model_Ticket. I can get the tickets for all the matches and then Model_Ticket->match contains them all
    But I would like to get all tickets sold for the upcoming match... something like that
         ->where( 'match.start', '>', $time)            

    does not seem to work. Is it possible to do something like that ? Thanks
  • See the 'relations' page of the ORM documentation. You need to specify your related table on the query:
        ->where( 'match.start', '>', $time)
  • oh damn. I missed it! Thanks man!

Howdy, Stranger!

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

In this Discussion