Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Compare Related table column with parent column
  • Model_Thread::find()->related('posts')->where('posts.id', '=', 'threads.last_post_id')->get();
    

    threads.last_post_id is the part i'm trying to work out getting access to.
    column This works, but clearly -wrong-, but you can see the advantage of being able to access and compare fields from a parent table.
    Model_Thread::find()->related('posts')->where('posts.id', '=', DB::expr('`t0`.`last_post_id`'))->get();
    
  • Not yet possible, you can add an issue on Github to have it included in v1.1.

Howdy, Stranger!

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

In this Discussion