Page is a not externally linkable
- Code, Content, and Presentation
-- Databases
---- Join across 3 tables


Maurice - 4:54 pm on Dec 7, 2010 (gmt 0)


very quickly of the top of my head using generic sql somthing like this

SELECT a.order_id, b.customer,c.fname,c.sname, d.fname,d.sname
FROM db1.tbl_1 a, db1.tbl_2 b,db1.tbl_3 c, db2.tbl_4 d
WHERE a.order_id = b.order_id AND
b.customer = d.id AND
a.writer = c.id

though you need to say what database you are.


Thread source:: http://www.webmasterworld.com/databases_sql_mysql/4239270.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com