I have four MYSQL 5.0 tables: userdb, filterdb, filterlinkdb, mandatoryfilterdb.
All tables are simple. * = pri
userdb:
id*
name
filterdb:
id*
name
filterlinkdb:
user_id*
filter_id*
mandatoryfilterdb
filter_id*
How can I check filterlinkdb to make sure that all mandatoryfilterdb records exist for every user_id using a single (with or without subs) query?
Edit :: I forgot to say, I would like to return the filter_id values from mandatorydb that are not present in filterlinkdb for all user_id, eg: user #1 only has filter 1, but 1 and 2 are in the mandatorydb, so it would return user 1, filter 2 (as that is missing).