<% function ListSubscribersForThread(objConnection, intThreadID, intAuthorID) 'List all users who subscribe to this message - except the author and users with group subscription. dim strSQL, intGroupID intGroupID = lookup("thegroup", "forumSubThreads", "ID", intThreadID) strSQL = "SELECT forumUsers.email, forumUsers.username " & _ "FROM forumUsers INNER JOIN forumEmailnotifications ON forumUsers.ID = forumEmailnotifications.userID " & _ "WHERE forumEmailnotifications.thread=" & intThreadID & " AND forumEmailnotifications.userID<>" & intAuthorID & _ " 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(objConnection, strSQL) end function %>