I have a mysql table with 2 columns and a set of values called MAIN.
table1:
col1, int(11)
col2, int(11)
Set of values: MAIN: 1,3,4
col1 and col2 contain random integers between 1 and 10 for 1000 rows. Then, any rows where col1 and col1 contain the SAME integer are removed.
I'm trying to pull those rows from table1 where:
col1 contains values from MAIN and col2 does not.
AND
col2 contains values from MAIN and col1 does not.
in invented pseudo code I have:
mysql_query("SELECT col1,col2
FROM table1
WHERE (col1 contains values from MAIN and col2 does not)
OR (col2 contains values from MAIN and col1 does not) ");
Any ideas on what the correct syntax is for this?
P.S. The set of values starts as a PHP array.