$query="SELECT i.trans_date, f.col_code,f.trans_qty ,t.dept_code
FROM table1 AS i
LEFT JOIN table2 AS f
ON f.trans_no=i.trans_no
LEFT JOIN table3 AS t
ON t.trans_no=i.trans_no";
trans_no --> Primary key in table 1
trans_no --> Foreign key in table 2,3
I am trying to fetch the above fields from the 3 tables but not getting it?
I wanna fetch date(tbl1),qty(tbl2),col_code(tbl2),col_code(tbl3),dept_code(tbl3)
..
Plz Help