schmalere index.php
This commit is contained in:
parent
b85a412318
commit
a34f65472c
|
@ -14,9 +14,10 @@
|
|||
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 ";
|
||||
/*$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 ";
|
||||
|
@ -111,6 +112,7 @@ $data = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
|||
|
||||
<?php
|
||||
|
||||
/*
|
||||
//Tabelle
|
||||
$sql = "SELECT * FROM data where scan = (select MAX(scans.id) from scans inner join data on data.scan=scans.id where site=4) and place like 'Deutschland.%' order by amount desc";
|
||||
echo '<h2>Fallzahlen in Deutschland - Nach Robert Koch Institut</h2>';
|
||||
|
@ -133,7 +135,7 @@ foreach ($pdo->query($sql) as $row){
|
|||
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>';
|
||||
echo '</table>';*/
|
||||
?>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue