I have two table (table1 and table2) where table2 is a subset of table1, what I am trying to do is a select statement that return a boolean if a field of tabl1 is also in the table2
For example: Table 1 has item1, item2, item3 and item4 Table 2 has item2 and item4
I am trying to create a select statement that returns
item1, false item2, true item3, false item4, true
So far I was able to select all the elements that is in table1 but not in table2 or all elements that isn't in table1 but is on table2. However I cannot find the solution for this problem and I can't get the correct words to google it. I hope someone can help me.
I am running the queries in PHP the database I am using is mySQL