Welcome Guest, Not a member yet? Register   Sign In
Nested joins via Active Record?
#1

Is it possible to generate nested joins using Active Record?
Alternatively, is it possible to add segements of manually written SQL to an Active Record query?
This is the sort of thing I'm trying to do...
Code:
FROM table_1 INNER JOIN
    (table_2 INNER JOIN
        (table_3 INNER JOIN table_4 ON table_3.field = table_4.field)
        ON table_2.field = table_4.field)
    ON table_1.field = table_4.field
WHERE etc...
Reply




Theme © iAndrew 2016 - Forum software by © MyBB