I need some help using mysql and phpmyadmin; I have two tables with two column fields in common, and I need to join both tables into a third where this two fields of each table are in common; also the reference table is the table 1, so the idea is that 3rd table is actually table 1 with the aditional of table 2 adding value 1 and value 2 from table table 2 into table 1 where Column 1 and Column 2 are the same for both tables... for example:
table1:
ID, Column1, Column2, Value1, Value2
1 , DAN , Citi1 , 1 , 3
2 , JUAN , Citi1 , 5 , 5
3 , DAN , Citi2 , 3 , 7
4 , PEDRO , Citi1 , 2 , 4
5 , JUAN , Citi2 , 7 , 9
table2:
ID, Column1, Column2, Value1, Value2
1 , DAN , Citi1 , 5 , 0
2 , JUAN , Citi1 , 0 , 3
3 , DAN , Citi2 , 4 , 5
4 , JUAN , Citi2 , 6 , 8
table 3, join:
ID, t1/t2.Column1 , t1/t2.Column2, t1.Value1, t1.Value2, t2.Value1, t2.Value2
ID, t1.Column1, t1.Column2, t1.Value1, t1.Value2, t2.Value1, t2.Value2
1 , DAN , Citi1 , 1 , 3 , 5 , 0
2 , JUAN , Citi1 , 5 , 5 , 0 , 3
3 , DAN , Citi2 , 3 , 7 , 4 , 5
4 , PEDRO , Citi1 , 2 , 4 , 0 , 0
5 , JUAN , Citi2 , 1 , 3 , 6 , 8