";
@@ -197,12 +197,17 @@ if($_GET['unlinkmember'] && $_GET['unlinkcommittee']) {
echo "";
echo "";
- $q=mysql_query("SELECT accounts_id,MAX(year),firstname,lastname,email,deleted FROM users WHERE types LIKE '%committee%' GROUP BY accounts_id ORDER BY firstname");
+ $query = "
+ SELECT accounts_id, firstname, lastname, email, deleted FROM users WHERE accounts_id IN(
+ SELECT accounts_id FROM user_roles JOIN roles ON user_roles.roles_id = roles.id WHERE roles.type = 'committee'
+ )
+ AND conferences_id = " . $conference['id'];
+ $q = mysql_query($query);
echo " | | ";
echo i18n("Enter an Email: ");
echo " | ";
|