php - How to inner join 3 tables using mySQL? -
i have joined 2 tables below correctly
select m.id mid, c.id cid members m inner join companies c on m.id=c.id and wanted add 3rd table also, can not working.
select m.id mid, c.id cid, u.id uid members m inner join companies c on m.id=c.id inner join users u on m.id=u.id what missing here?
switch them inner joins left joins.
if use inner join, , result not exist in 3 tables, excluded, appearing fail/not return results.
select m.id mid, c.id cid, u.id uid members m left join companies c on m.id=c.id left join users u on m.id=u.id that should take care of issues seeing.
Comments
Post a Comment