This commit is contained in:
Göran Heinemann 2020-03-06 21:24:46 +01:00
parent c62b5749dc
commit a051402432

View File

@ -41,6 +41,23 @@ if (isset($_GET['source'])){
echo '<td>'.$test[$i].'</td>';
}
echo'<table>';
}else{
if ($_GET['type'] == 'html');
$sql = "SELECT * FROM data WHERE scan=? order by amount desc";
$stmt = $pdo->prepare($sql);
$stmt->bindParam(1, $_GET['time']);
$stmt->execute();
$data = $stmt->fetchAll(PDO::FETCH_ASSOC);
echo '<table>';
echo '<tr><th>id</th><th>Scan-No</th><th>Place</th><th>infected</th><th>dead</th><th>active</th><th>cured</th></tr>';
foreach ($data as $row){
echo '<tr>';
foreach ($row as $item){
echo '<td>'.$item.'</td>';
}
echo '</tr>';
}
echo '</table>';
}
}else{
$sql = "SELECT * FROM data WHERE scan=?";