The following are my mysql tables
Table 1:
ID  | commonID | Date  | text | active
1     11         01.02   abc    1
2     11         02.02   123    1 
3     11         03.02   xyz    0
Table 2:
ID  | commonID | Date  | value | active
1     11         01.02   abc    1
2     11         04.02   123    1 
3     11         03.02   xyz    1
The Final result should display this:
| date | text |   value
  01.02  abc      abc
  02.02  123      (null)
  03.02  (null)   xyz
  04.02  (null)   123
The Idea here is, to merge the two tables. All entries with a defined commonID like 11 in the example will be selected from both tables. then the tables will be united. Conditions:
If there are matching dates in TABLE1 and TABLE2 they will be merged If there is a solo date in TABLE1 or TABLE2, the value/text for the table with no date will become NULL If there is a record in TABLE1 or TABLE2 that has active = FALSE, it will not be processed. There can be matching and not matching dates in BOTH tables.
I want to use this for display chronologic events, if there is an event in both tables, there should be only one line for this.
What could be the Solution here?
 
     
     
    