links zu detailseiten
This commit is contained in:
parent
c6e60e6579
commit
1812e7b74e
@ -13,6 +13,11 @@
|
||||
<?php
|
||||
include '../config.php';
|
||||
|
||||
//in total
|
||||
$sql = "SELECT sum(amount) as total, sum(active) as active, sum(cured) as cured, sum(deaths) as dead FROM data where scan = (select MAX(scans.id) from scans inner join data on data.scan=scans.id where site=2) order by active desc ";
|
||||
$data = $pdo->query($sql)->fetchAll(PDO::FETCH_ASSOC)[0];
|
||||
echo '<h4>Insgesammt hat das Coronavirus '.$data['total'].' Menschen infiziert. Von dieser Zahl sind noch '.$data['active'].' Fälle offen. Von den restlichen sind '.$data['cured'].' geheilt und '.$data['dead'].' gestorben. Das entspricht einer theorethischen leathalität von <b>'.number_format(intval($data['dead'])/intval($data['cured'])*100, 4).'%</b>, wenn man die Dunkelziffer der Infektionen ausser acht lässt.</h4>';
|
||||
|
||||
//grafik
|
||||
$sql = "SELECT scans.id, place, amount, time FROM `data` inner join scans on scans.id=data.scan WHERE place like 'Germany' group by amount order by time asc ";
|
||||
$stmt = $pdo->query($sql);
|
||||
@ -114,7 +119,7 @@ echo '<table style="width: 50%">';
|
||||
echo '<tr><th>Platz</th><th>Land</th><th>kumulative Fallzahl</th></tr>';
|
||||
$i = 1;
|
||||
foreach ($pdo->query($sql) as $row){
|
||||
echo '<tr><td>'.$i.'</td><td>'.str_replace("D-", "", $row['place']).'</td><td>'.$row['amount'].'</td></tr>';
|
||||
echo '<tr><td>'.$i.'</td><td><a href="laender.php?land='.trim($row['place']).'">'.str_replace("D-", "", $row['place']).'</a></td><td>'.$row['amount'].'</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
echo '</table>';
|
||||
@ -218,7 +223,7 @@ echo '<table style="width: 100%">';
|
||||
echo '<tr><th>Platz</th><th>Land</th><th>Aktive Fälle</th><th>kumulative Fallzahl</th><th>geheilte</th><th>Todesfälle</th></tr>';
|
||||
$i = 1;
|
||||
foreach ($pdo->query($sql) as $row){
|
||||
echo '<tr><td>'.$i.'</td><td>'.$row['place'].'</td><td>'.$row['active'].'</td><td>'.$row['amount'].'</td><td>'.$row['cured'].'</td><td>'.$row['deaths'].'</td></tr>';
|
||||
echo '<tr><td>'.$i.'</td><td><a href="laender.php?land='.trim($row['place']).'">'.$row['place'].'</a></td><td>'.$row['active'].'</td><td>'.$row['amount'].'</td><td>'.$row['cured'].'</td><td>'.$row['deaths'].'</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
echo '</table>';
|
||||
|
Loading…
Reference in New Issue
Block a user