Only show the count of awards and contacts for a sponsor for the current fairyear.

This commit is contained in:
james 2006-07-26 14:42:03 +00:00
parent 7d7dd74b18
commit ea82b61700

View File

@ -158,11 +158,11 @@
echo "</td>\n";
echo " <td>$r->organization</td>\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;