Hello all,
I have a small message system I built but have gotten stumped. I'd like to create an "Unread Messages" indicator. So if there are no unread messages, show one picture, if there are new unread messages, show a different picture.
So if I have a table like so:
USERNAME MESSAGE_READ(Yes or No)
bob Y
suzy N
bob N
steve Y
steve Y
suzy N
I'd like the query to produce a list of unique Usernames and tell me if that Username has any "N" in the Message_Read field
So from the table above we have:
bob YN
steve YY
suzy NN
Therefore bob has an unread message and suzy has atleast one unread message. Based on this, I'd like the the query to produce some sort of output on which I can place an if statement in my page to display a picture or text indicating they whether they have a new message or not:
bob "You Have Unread Messages"
steve "No New Messages"
suzy "You Have Unread Messages"
etc...
Is this possible?
Thank you very much!
Peter