Welcome Guest, Not a member yet? Register   Sign In
Question about a 3 table join, and calling a model method from a view.
#3

[eluser]phpnoob[/eluser]
Yes here is a raw SQL:

Code:
SELECT *
FROM table1 RIGHT OUTER JOIN
     table2 ON table1.table1_id = table2.table1_id LEFT OUTER JOIN
     table3 ON table2.table3_id = table3.table3_id


I can then do an optional WHERE. But Im just looping through each record in table1 and getting all the records associated with it from table3. table2 is a many to many between the two.


Messages In This Thread
Question about a 3 table join, and calling a model method from a view. - by El Forum - 10-14-2009, 10:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB