Changeset 30 for trunk/index.php
- Timestamp:
- Sep 21, 2019, 8:37:41 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r29 r30 387 387 if (!is_numeric($TeamId)) die('FamilyId needs to be numeric'); 388 388 389 $DbResult = $this->Database->query('SELECT * FROM Team WHERE Id='.$TeamId.' AND IsFamily=1'); 389 $DbResult = $this->Database->query('SELECT Team.*, '. 390 '(SELECT COUNT(*) FROM Runner WHERE Runner.Team=Team.Id) AS RunnerCount, '. 391 '(SELECT TeamStat.Distance FROM TeamStat WHERE TeamStat.Team=Team.Id ORDER BY TeamStat.Time DESC LIMIT 1) AS Distance, '. 392 '(SELECT TeamStat.Money FROM TeamStat WHERE TeamStat.Team=Team.Id ORDER BY Time DESC LIMIT 1) AS Money, '. 393 '(SELECT TeamStat.Rank FROM TeamStat WHERE TeamStat.Team=Team.Id ORDER BY Time DESC LIMIT 1) AS Rank '. 394 'FROM Team WHERE Id='.$TeamId.' AND IsFamily=1'); 390 395 $DbRow = $DbResult->fetch_assoc(); 391 396 $Output .= '<div class="page-title">Family '.$DbRow['Name'].'</div>'; 397 $Output .= '<div class="section-title">'.$this->ItemsYearList('/family/', $RunnerId, 'Team', 'Name="'.$DbRow['Name'].'"').'</div>'; 398 $Output .= '<div class="section-title">Runners: '.$DbRow['RunnerCount'].', Distance: '.$DbRow['Distance'].' km, Money: '.$DbRow['Money'].' Kč, Rank: '.$DbRow['Rank'].'</div>'; 392 399 393 400 $Where = 'Team='.$TeamId;
Note:
See TracChangeset
for help on using the changeset viewer.