I'm comparing two SQL tables (table1 & table2), if they have a common 'ID' I want to print out both. If they don't share the 'ID' I want to only print out the first table value. I did a JOIN but I could only output the data that had matching values. I then tried to SELECT * the data and put it in an array and then filter it with PHP instead, but am struggling.
SELECT table1.value, table2.additionalinfo
FROM table1
INNER JOIN table2
ON table1.ID=table2.ID