forked from science-ation/science-ation
Fix the scheduler config to work with multi-year data
This commit is contained in:
parent
5748382c97
commit
c53e130cc4
@ -83,13 +83,13 @@
|
|||||||
echo "<br />";
|
echo "<br />";
|
||||||
|
|
||||||
$totalteams=0;
|
$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))
|
while($catr=mysql_fetch_object($catq))
|
||||||
{
|
{
|
||||||
echo "<h3>$catr->category</h3>";
|
echo "<h3>$catr->category</h3>";
|
||||||
echo "<table>";
|
echo "<table>";
|
||||||
echo "<tr><th>Division</th><th>Projects</th><th>Teams</th></tr>";
|
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))
|
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'");
|
$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
|
award_awards_projectdivisions
|
||||||
WHERE
|
WHERE
|
||||||
award_awards.year='{$config['FAIRYEAR']}'
|
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_projectcategories.award_awards_id
|
||||||
AND award_awards.id=award_awards_projectdivisions.award_awards_id
|
AND award_awards.id=award_awards_projectdivisions.award_awards_id
|
||||||
AND award_awards_projectcategories.projectcategories_id='$c_id'
|
AND award_awards_projectcategories.projectcategories_id='$c_id'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user