I have a sql query that retrieves results from a table, but I need it to only show results if the identifiers 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 identifier does not exist in the "more_id" list, it should show the result.
It does not seem to work, any help would be greatly appreciated. It should be noted that "more_id" is the same "id", but in a different table in which other records are stored.
source
share