From a6741d58acc0d63a76623ca232842ab2f9ebfa5a Mon Sep 17 00:00:00 2001 From: james Date: Fri, 1 Apr 2011 14:29:33 +0000 Subject: [PATCH] Add CWSF Winners from Last Year and CWSF Winners from ALL Years to communication module --- admin/communication.inc.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/admin/communication.inc.php b/admin/communication.inc.php index b8b6f4db..f0e8e812 100644 --- a/admin/communication.inc.php +++ b/admin/communication.inc.php @@ -62,6 +62,28 @@ WHERE award_awards.cwsfaward='1' AND winners.year='".$config['FAIRYEAR']."' ORDER BY students.email"), + "participants_cwsf_lastyear"=>array("name"=>"CWSF Winners from last 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']-1)."' + ORDER BY students.email"), + + "participants_cwsf_allyears"=>array("name"=>"CWSF Winners from all years","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' + ORDER BY students.email"), + "sponsors"=>array("name"=>"Organization sponsors","query"=> "SELECT id, organization, email FROM sponsors WHERE email!='' ORDER BY email"),