I've been browsing through posts here, but I haven't found anything relevant
to my issue, so I guess I'll just post it myself:

I have three tables: users, groups (which define collections of users),
messages, and replies (replies are completely different from messages and
warrant their own table).  Each message is sent out to a single group of
users, and each user recieving the message can submit one reply.  Here is
the relevant (simplified) table info:

messages
--------------------
int id
int userID (the person who sent the message)
int groupID (the group that the message is sent to)
text messageBody
etc.

replies
--------------------
int id
int messageID (the message this is a reply to)
int userID (the user who sent the reply)
text replyBody
etc.

users
------------------
int id
text userName
etc.

groups
----------------
int id
text groupName
etc.

g-u
--------------
int groupID
int userID

How can I write a query that returns the sender's username and message's id
for every message which a specified user has been sent but has not yet
replied to?  If you could explain your answer reasonably, please do so - I
would like to learn how to write such a query so I don't have to bug the
mailing list again.  I'm using mySQL 4.0.x, so I can't use subqueries.
Thanks!

-Eric Winer


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to