SQL to get Unique Email
Posted: Tue Mar 24, 2009 1:54 am
hello,
i allow my users to enter conversations with one another. if a new comment is posted in one of these conversations, then i would like all users involved to receive an email to let them know about the new comment. can i use SQL to query only the unique email addresses in a conversation? i tried LIMIT and that didn't work.
the way it stands now, users are sent an multiple emails (i only want each participating user to receive one email)...
SELECT testComment.email, testComment.comment_title FROM testComment WHERE testComment.comment_title = %s GROUP BY testComment.email
thank you!
i allow my users to enter conversations with one another. if a new comment is posted in one of these conversations, then i would like all users involved to receive an email to let them know about the new comment. can i use SQL to query only the unique email addresses in a conversation? i tried LIMIT and that didn't work.
the way it stands now, users are sent an multiple emails (i only want each participating user to receive one email)...
SELECT testComment.email, testComment.comment_title FROM testComment WHERE testComment.comment_title = %s GROUP BY testComment.email
thank you!