From 21bb3ec99459f88f3c92a5b0f66e2eba2413d984 Mon Sep 17 00:00:00 2001 From: james Date: Tue, 13 Apr 2010 15:00:03 +0000 Subject: [PATCH] Add communication query for "CWSF Students for this year" so its easy to send an email to all the CWSF winners --- admin/communication.inc.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/admin/communication.inc.php b/admin/communication.inc.php index 3306127..4d90c16 100644 --- a/admin/communication.inc.php +++ b/admin/communication.inc.php @@ -45,6 +45,17 @@ "participants_complete_allyears"=>array("name"=>"Participants complete all years","query"=> "SELECT DISTINCT firstname, lastname, students.email FROM students,registrations WHERE students.registrations_id=registrations.id AND ( registrations.status='complete' OR registrations.status='paymentpending') ORDER BY students.email"), + "participants_cwsf_thisyear"=>array("name"=>"CWSF Winners for this year","query"=>" + SELECT DISTINCT students.firstname, students.lastname, students.email + FROM award_awards + JOIN award_prizes ON award_prizes.award_awards_id=award_awards.id + JOIN winners ON winners.awards_prizes_id=award_prizes.id + JOIN projects ON winners.projects_id=projects.id + JOIN registrations ON projects.registrations_id=registrations.id + JOIN students ON students.registrations_id=registrations.id + WHERE award_awards.cwsfaward='1' AND winners.year='".$config['FAIRYEAR']."' + ORDER BY students.email"), + "sponsors"=>array("name"=>"Organization sponsors","query"=> "SELECT id, organization, email FROM sponsors WHERE email!='' ORDER BY email"),