From ea82b6170066c3ed1e1ab192e7bd19d7ef4a5740 Mon Sep 17 00:00:00 2001 From: james Date: Wed, 26 Jul 2006 14:42:03 +0000 Subject: [PATCH] Only show the count of awards and contacts for a sponsor for the current fairyear. --- admin/award_sponsors.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/award_sponsors.php b/admin/award_sponsors.php index ef745ce..66f6f35 100644 --- a/admin/award_sponsors.php +++ b/admin/award_sponsors.php @@ -158,11 +158,11 @@ echo "\n"; echo " $r->organization\n"; - $numq=mysql_query("SELECT COUNT(id) AS num FROM award_awards WHERE award_sponsors_id='$r->id'"); + $numq=mysql_query("SELECT COUNT(id) AS num FROM award_awards WHERE year='".$config['FAIRYEAR']."' AND award_sponsors_id='$r->id'"); $numr=mysql_fetch_object($numq); $numawards=$numr->num; - $numq=mysql_query("SELECT COUNT(id) AS num FROM award_contacts WHERE award_sponsors_id='$r->id'"); + $numq=mysql_query("SELECT COUNT(id) AS num FROM award_contacts WHERE year='".$config['FAIRYEAR']."' AND award_sponsors_id='$r->id'"); $numr=mysql_fetch_object($numq); $numcontacts=$numr->num;