forked from science-ation/science-ation
Use the proper judges_teams_id. If there are no projects print a message.
This commit is contained in:
parent
0dd1637415
commit
6e30724785
@ -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,6 +122,9 @@ foreach($teams as $t) {
|
||||
echo "<table><tr><td><b>".i18n('Projects').'</b>:';
|
||||
echo '</td><td>';
|
||||
|
||||
if(count($t['projects'])== 0) {
|
||||
echo i18n("No projects assigned.");
|
||||
} else {
|
||||
echo '<table>';
|
||||
foreach($t['projects'] as $p) {
|
||||
$pn = urlencode($p['projectnumber']);
|
||||
@ -129,6 +132,7 @@ foreach($teams as $t) {
|
||||
echo "</tr>";
|
||||
}
|
||||
echo '</table>';
|
||||
}
|
||||
|
||||
echo '</td></tr></table>';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user