Hello,
I'm creating ad's system.
There are two mysql tables: ads and views.
ads
views
In views i put the ids of ads table's entries.
How to select from ads only rows, which ids don't exist in views table?
Thank's.
SELECT * FROM ads WHERE id NOT IN(SELECT DISTINCT id FROM views)
Returns:
You have an error in your SQL syntax near 'SELECT DISTINCT id FROM views ) LIMIT 0, 30 ' at line 1
you'll need mySQL 4.1.0 or higher to use subqueries