Hi, I have a sql query that is retrieving results from a table but I need it to only show results if the ids are not in another table.
Example
$sql = "SELECT id FROM TABLE_1 WHERE id NOT IN(SELECT more_id FROM TABLE_2)
The idea is that if the id does not exist in the list of "more_id" then it should show the result.
It does not seem to work, any help would be greatly appreciated. I should mention that "more_id" is just the same "id" but in another table that stores other records.