<% function ListSubscribersForThread(ByRef pobjCon, ByVal pintThreadID, ByVal pintAuthorID) 'List all users who subscribe to this message - except the author and users with group subscription. dim strSQL, intGroupID intGroupID = lookup(pobjCon, "thegroup", "forumSubThreads", "ID", pintThreadID) strSQL = "SELECT forumUsers.email, forumUsers.username " & _ "FROM forumUsers INNER JOIN forumEmailnotifications ON forumUsers.ID = forumEmailnotifications.userID " & _ "WHERE forumEmailnotifications.thread=" & pintThreadID & " AND forumEmailnotifications.userID<>" & pintAuthorID & _ " AND forumUsers.ID NOT IN (" & _ "SELECT forumUsers.ID " & _ "FROM forumUsers INNER JOIN forumGroupEmailNotifications ON forumUsers.ID = forumGroupEmailNotifications.userID " & _ "WHERE forumGroupEmailNotifications.thegroup=" & intGroupID & _ ")" set ListSubscribersForThread = OpenRS(pobjCon, strSQL) end function %>