mysql - Join 2 tables using bridge -
table addressesemail: id name line city state zip email 1 name1 address1 city1 state1 12345 null 2 name2 address2 city2 state2 12345 null 3 name3 address3 city3 state3 25869 email214 table orders: id email date status 1 email1 date1 closed 2 email2 date2 closed 3 email3 date3 open table orders_billing_address order_id address_id 1 1 2 1 3 1 4 2 5 3 select a.name, a.line1, a.line2, a.city, a.state, a.zip, group_concat(c.email) addressesemail left join orders_billing_address b on b.address_id = a.id left join orders c on b.order_id = c.id problems:
only imports first row addressesemail table.
imports emails first row on addressesemail table.
it's been years since i've tried code, , don't know i'm doing wrong. appreciated.
Comments
Post a Comment