View Single Post
  #2 (permalink)  
Old 11-29-2006, 05:59 PM
ben ben is offline
Administrator
 
Join Date: Mar 2007
Posts: 92
ben has disabled reputation
Default SQL 92 answer. Re: How to use two joins in a single query?

[sql]
SELECT * FROM table as t1
JOIN table2 as t2 ON t2.t1_id = t1.id
JOIN table3 as t3 ON t3.t1_id = t1.id
[/sql]

In this example table2 and table 3 are children of table1 and both have a foreign key field named t1_id
Reply With Quote