Been playing around with this for 2 hours and I just can't figure it out. In my MySql table I have a column named 'conflicts' that holds a comma separated string of 'menu_names', which is another column, that can't be clicked when itself is clicked.
Every 'menu_name' in the string needs for the row for that 'menu_name' to also have itself in it's conflict string.
Let's say that I have these four rows in my table;
menu_name conflicts
====================================================
Apple | Banana,Carrot
Banana | Apple,Carrot
Carrot | Apple,Banana
Bean | Carrot
In the above example we look at the conflicts of Apple and see Banana,Carrot. When checking the conflicts for Banana we find Apple and when checking Carrot we also fin Apple so that's good and I don't want that record. Banana and Carrot get passed over as well.
When we look at Bean we find it conflicts with Carrot. When checking Carrot we don't find Bean so that is the only record the query would return in this example.
Is this even possible to do with a single query?