diff --git a/judge_schedule.php b/judge_schedule.php
index b294ba1..cc31032 100644
--- a/judge_schedule.php
+++ b/judge_schedule.php
@@ -64,7 +64,7 @@ while($t = mysql_fetch_assoc($q)) {
$qq = mysql_query("SELECT T.* FROM judges_teams_timeslots_link
LEFT JOIN judges_timeslots ON judges_timeslots.id=judges_teams_timeslots_link.judges_timeslots_id
LEFT JOIN judges_timeslots AS T ON T.id=judges_timeslots.round_id
- WHERE judges_teams_timeslots_link.judges_teams_id={$t['id']}");
+ WHERE judges_teams_timeslots_link.judges_teams_id={$t['judges_teams_id']}");
$tt = mysql_fetch_assoc($qq);
echo mysql_error();
$t['timeslot'] = $tt;
@@ -73,7 +73,7 @@ while($t = mysql_fetch_assoc($q)) {
$qq = mysql_query("SELECT award_awards.*,T.type FROM judges_teams_awards_link
LEFT JOIN award_awards ON award_awards.id=judges_teams_awards_link.award_awards_id
LEFT JOIN award_types as T ON T.id=award_awards.award_types_id
- WHERE judges_teams_awards_link.judges_teams_id={$t['id']}");
+ WHERE judges_teams_awards_link.judges_teams_id={$t['judges_teams_id']}");
echo mysql_error();
$aa = mysql_fetch_assoc($qq);
$t['award'] = $aa;
@@ -81,7 +81,7 @@ while($t = mysql_fetch_assoc($q)) {
/* Load team members */
$qq = mysql_query("SELECT * FROM judges_teams_link
LEFT JOIN users ON users.id=judges_teams_link.users_id
- WHERE judges_teams_link.judges_teams_id={$t['id']}
+ WHERE judges_teams_link.judges_teams_id={$t['judges_teams_id']}
ORDER BY judges_teams_link.captain,users.lastname,users.firstname");
$t['members'] = array();
while(($mm = mysql_fetch_assoc($qq))) {
@@ -91,7 +91,7 @@ while($t = mysql_fetch_assoc($q)) {
/* Load projects */
$qq = mysql_query("SELECT projects.id,projects.projectnumber,projects.title FROM judges_teams_timeslots_projects_link
LEFT JOIN projects ON projects.id=judges_teams_timeslots_projects_link.projects_id
- WHERE judges_teams_id={$t['id']}");
+ WHERE judges_teams_id={$t['judges_teams_id']}");
$p = array();
while(($pp = mysql_fetch_assoc($qq)))
$p[] = $pp;
@@ -122,13 +122,17 @@ foreach($teams as $t) {
echo "
".i18n('Projects').':';
echo ' | ';
- echo '';
- foreach($t['projects'] as $p) {
- $pn = urlencode($p['projectnumber']);
- echo "{$p['projectnumber']} | - | {$p['title']} | ";
- echo " ";
+ if(count($t['projects'])== 0) {
+ echo i18n("No projects assigned.");
+ } else {
+ echo '';
+ foreach($t['projects'] as $p) {
+ $pn = urlencode($p['projectnumber']);
+ echo "{$p['projectnumber']} | - | {$p['title']} | ";
+ echo " ";
+ }
+ echo ' ';
}
- echo ' ';
echo ' |
';