I'm scratching my head over a MySQL subquery. And it's only after scratching for more than a couple of hours that I post it here in SO. So here it is:
$query_1 = "SELECT *
FROM table_new
WHERE table_new.NAME NOT IN ('text I know does not exist') ";
$query_2 = "SELECT *
FROM table_new,
table_old
WHERE table_new.NAME = table_old.NAME ";
$query_3 = "SELECT *
FROM table_new
WHERE table_new.NAME NOT IN (SELECT *
FROM table_new,
table_old
WHERE table_new.NAME = table_old.NAME) ";
Here's the problem:
$query_1 and $query_2 work. But when I combine them in $query_3, it doesn't work.
Any thoughts?