Changeset 21 for trunk/index.php


Ignore:
Timestamp:
Sep 6, 2019, 9:36:21 PM (5 years ago)
Author:
chronos
Message:
  • Added: Show link to team under runner name.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/index.php

    r20 r21  
    375375    $Output .= '<div class="page-title">Family '.$DbRow['Name'].'</div>';
    376376
    377 
    378377    $Where = 'Team='.$TeamId;
    379378
     
    603602    if (!is_numeric($RunnerId)) die('Runner id needs to be numeric');
    604603
    605     $DbResult = $this->Database->query('SELECT * FROM Runner WHERE Id='.$RunnerId);
     604    $DbResult = $this->Database->query('SELECT Runner.Name, Team.Name AS TeamName, Team.Id AS TeamId FROM Runner LEFT JOIN Team ON Team.Id=Runner.Team WHERE Runner.Id='.$RunnerId);
    606605    $DbRow = $DbResult->fetch_assoc();
    607606    $Output .= '<div class="page-title">Runner '.$DbRow['Name'].'</div>';
    608 
     607    if ($DbRow['TeamName'] != '')
     608      $Output .= '<div class="section-title"><a href="'.$this->Link('/team/'.$DbRow['TeamId']).'">'.$DbRow['TeamName'].'</a></div>';
    609609
    610610    $Where = 'RunnerStat.Runner='.$RunnerId;
Note: See TracChangeset for help on using the changeset viewer.