I have a table of reports and assigned to each of them is a number of keywords
REPORT(id, description, etc)
KEYWORD(id, report_id, name)
i want to get reports where there aren't certain keywords
so something like
SELECT DISTINCT(report.id) from keyword WHERE keyword NOT IN (1707,13,15)
To get all the report_id's where there is not a keyword_id thats
ie
report keyword
1 1707
1 14
2 1
3 15
would return "2"
But the trouble is with this as theres may be more than one keyword it may return a report where there is that keyword attached....
Thanks
REPORT(id, description, etc)
KEYWORD(id, report_id, name)
i want to get reports where there aren't certain keywords
so something like
SELECT DISTINCT(report.id) from keyword WHERE keyword NOT IN (1707,13,15)
To get all the report_id's where there is not a keyword_id thats
ie
report keyword
1 1707
1 14
2 1
3 15
would return "2"
But the trouble is with this as theres may be more than one keyword it may return a report where there is that keyword attached....
Thanks