I got 2 tables like these:
emails:
emailID int(10) auto_increment, memberID int(10), emailData text, and so on
members:
memberID int(10) auto_increment, user_name char(40), password char(50), and so on
My query is this:
select
emails.emailID, emails.emailData,
members.memberID, members.user_name
from emails, members where
emails.memberID = members.memberID
Now I've added two more tables like these:
blocked:
id int(10) auto_increment, memberID int(10), blocked_memberID int(10)
markedAsRead:
id int(10) auto_increment, memberID int(10), emailID int(10)
I want to modify my original query so that it excludes memberID
which are in blocked.blocked_memberID
and also excludes emailID
which are in markedAsRead.emailID
How can I do this?