Fix judges info to properly show the age category preference and areas of expertise

This commit is contained in:
james 2006-01-16 04:55:46 +00:00
parent d17e145158
commit 5ff9494d48

View File

@ -88,7 +88,7 @@ $preferencechoices=array(
echo "<tr>\n"; echo "<tr>\n";
echo " <th valign=\"top\"colspan=\"2\">".i18n("Age category preference")."</th><td colspan=\"2\">"; echo " <th valign=\"top\"colspan=\"2\">".i18n("Age category preference")."</th><td colspan=\"2\">";
$q=mysql_query("SELECT judges_catpref.*,projectcategories.category FROM judges_catpref,projectcategories WHERE judges_id='{$_GET['id']}' AND judges_catpref.year='".$config['FAIRYEAR']."' AND judges_catpref.projectcategories_id=projectcategories.id"); $q=mysql_query("SELECT judges_catpref.*,projectcategories.category FROM judges_catpref,projectcategories WHERE judges_id='{$_GET['id']}' AND judges_catpref.year='".$config['FAIRYEAR']."' AND projectcategories.year='".$config['FAIRYEAR']."' AND judges_catpref.projectcategories_id=projectcategories.id");
echo mysql_error(); echo mysql_error();
while($r=mysql_fetch_object($q)) while($r=mysql_fetch_object($q))
echo i18n($r->category).": ".$preferencechoices[$r->rank]." <br />"; echo i18n($r->category).": ".$preferencechoices[$r->rank]." <br />";
@ -158,7 +158,7 @@ while($r=mysql_fetch_object($q))
echo "<table class=\"viewtable\">"; echo "<table class=\"viewtable\">";
//grab the list of divisions, because the last fields of the table will be the sub-divisions //grab the list of divisions, because the last fields of the table will be the sub-divisions
$q=mysql_query("SELECT * FROM projectdivisions ORDER BY id AND year='".$config['FAIRYEAR']."'"); $q=mysql_query("SELECT * FROM projectdivisions WHERE year='".$config['FAIRYEAR']."' ORDER BY id");
$divs=array(); $divs=array();
while($r=mysql_fetch_object($q)) while($r=mysql_fetch_object($q))
{ {
@ -166,9 +166,15 @@ while($r=mysql_fetch_object($q))
$divnames[$r->id]=$r->division; $divnames[$r->id]=$r->division;
} }
$subdivq=mysql_query("SELECT judges_expertise.*, projectsubdivisions.subdivision, projectsubdivisions.projectdivisions_id AS parent_id FROM judges_expertise $subdivq=mysql_query("SELECT judges_expertise.*,
projectsubdivisions.subdivision,
projectsubdivisions.projectdivisions_id AS parent_id
FROM judges_expertise
LEFT JOIN projectsubdivisions ON judges_expertise.projectsubdivisions_id=projectsubdivisions.id LEFT JOIN projectsubdivisions ON judges_expertise.projectsubdivisions_id=projectsubdivisions.id
WHERE judges_id='$judgeinfo->id' AND judges_expertise.year='".$config['FAIRYEAR']."' ORDER BY projectdivisions_id, projectsubdivisions_id"); WHERE judges_id='$judgeinfo->id'
AND judges_expertise.year='".$config['FAIRYEAR']."'
ORDER BY projectdivisions_id, projectsubdivisions_id");
echo mysql_error();
$judge_divs=array(); $judge_divs=array();
$judge_subdivs=array(); $judge_subdivs=array();
$divdata=array(); $divdata=array();