Fix the scheduler config to work with multi-year data

This commit is contained in:
james 2006-01-03 02:33:11 +00:00
parent 5748382c97
commit c53e130cc4

View File

@ -83,13 +83,13 @@
echo "<br />";
$totalteams=0;
$catq=mysql_query("SELECT * FROM projectcategories ORDER BY mingrade");
$catq=mysql_query("SELECT * FROM projectcategories WHERE year='{$config['FAIRYEAR']}' ORDER BY mingrade");
while($catr=mysql_fetch_object($catq))
{
echo "<h3>$catr->category</h3>";
echo "<table>";
echo "<tr><th>Division</th><th>Projects</th><th>Teams</th></tr>";
$divq=mysql_query("SELECT * FROM projectdivisions ORDER BY id");
$divq=mysql_query("SELECT * FROM projectdivisions WHERE year='{$config['FAIRYEAR']}' ORDER BY id");
while($divr=mysql_fetch_object($divq))
{
$numq=mysql_query("SELECT COUNT(id) AS num FROM projects WHERE projectcategories_id='$catr->id' AND projectdivisions_id='$divr->id'");
@ -154,6 +154,8 @@ foreach($div AS $d_id=>$d_division)
award_awards_projectdivisions
WHERE
award_awards.year='{$config['FAIRYEAR']}'
AND award_awardS_projecetcategories.year='{$config['FAIRYEAR']}'
AND award_awardS_projecetdivisions.year='{$config['FAIRYEAR']}'
AND award_awards.id=award_awards_projectcategories.award_awards_id
AND award_awards.id=award_awards_projectdivisions.award_awards_id
AND award_awards_projectcategories.projectcategories_id='$c_id'