From 75e7d4e574e942fae42db7abbdfd472c0162bd2f Mon Sep 17 00:00:00 2001 From: jacob Date: Mon, 28 Mar 2011 14:44:25 +0000 Subject: [PATCH] Just a few quick query updates --- admin/communication.inc.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/admin/communication.inc.php b/admin/communication.inc.php index 11e865a8..6e3af4f4 100644 --- a/admin/communication.inc.php +++ b/admin/communication.inc.php @@ -23,25 +23,25 @@ WHERE roles.type ='judge' GROUP BY users.accounts_id HAVING deleted='no' ORDER BY email"), "judges_active_thisconference"=>array("name"=>"Judges active for this conference", "query"=> - "SELECT firstname, lastname, email FROM users + "SELECT users.id FROM users LEFT JOIN user_roles ON user_roles.users_id = users.id JOIN roles ON roles.id = user_roles.roles_id WHERE roles.type='judge' AND conferences_id={$conference['id']} AND deleted='no' AND user_roles.active='yes' ORDER BY email"), "judges_inactive_thisconference"=>array("name"=>"Judges in the conference that are not active", "query"=> - "SELECT firstname, lastname, email FROM users + "SELECT users.id FROM users LEFT JOIN user_roles ON user_roles.users_id = users.id JOIN roles ON roles.id = user_roles.roles_id WHERE roles.type='judge' AND conferences_id={$conference['id']} AND deleted='no' AND user_roles.active='no' ORDER BY email"), "judges_inactive_allconferences"=>array("name"=>"Judges inactive for any conference", "query"=> - "SELECT firstname, lastname, email FROM users + "SELECT users.id FROM users LEFT JOIN user_roles ON user_roles.users_id = users.id JOIN roles ON roles.id = user_roles.roles_id WHERE roles.type='judge' AND deleted='no' AND user_roles.active='no' ORDER BY email"), "judges_active_complete_thisconference"=>array("name"=>"Judges active for this conference and complete", "query"=> - "SELECT firstname, lastname, email FROM users + "SELECT users.id FROM users LEFT JOIN user_roles ON user_roles.users_id = users.id JOIN roles ON roles.id = user_roles.id WHERE roles.type = 'judge' AND conferences_id = {$conference['id']} @@ -51,7 +51,7 @@ ORDER BY email"), "judges_active_incomplete_thisconference"=>array("name"=>"Judges active for this conference but not complete", "query"=> - "SELECT firstname, lastname, email FROM users + "SELECT users.id FROM users LEFT JOIN user_roles ON user_roles.users_id = users.id JOIN roles ON roles.id = user_roles.id WHERE roles.type = 'judge' AND conferences_id = {$conference['id']}