Hi everyone
Maybe somebody can help me with what seems like a tricky
subselect-avoidance question?
In a MySQL database, there are two tables - 'reports' and
'reports_signup'. 'reports' has two columns, 'id' and 'report_name'.
'reports_signup' has three columns - 'id', 'report_id' and 'user_id'.
('id' in this table may be superfluous). 'report_id' is a value from
the 'reports_table', and 'user_id' is a value from another table.
I've written a query to select the report names of all reports a
particular user (say, id '2') is signed up to:
SELECT reports.id,reports.report_name FROM reports LEFT JOIN
reports_signup ON reports.id = reports_signup.report_id WHERE
reports_signup.user_id = '2';
I now want to write a query to select the report names of all reports a
particular user is *not* signed up to - I'm having big troubles with this.
Can anybody assist me?
Best wishes,
Peter.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php