ansicht nach entwicklung laender
This commit is contained in:
parent
a051402432
commit
8e7773fe0d
@ -52,9 +52,7 @@ if (isset($_GET['source'])){
|
||||
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 '<td>'.$row['id'].'</td><td>'.$row['scan'].'</td><td><a href="laender.php?land='.$row['place'].'">'.$row['place'].'</a></td><td>'.$row['amount'].'</td><td>'.$row['deaths'].'</td><td>'.$row['active'].'</td><td>'.$row['cured'].'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</table>';
|
||||
|
21
html/laender.php
Normal file
21
html/laender.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
include "../config.php";
|
||||
|
||||
if(isset($_GET['land'])){
|
||||
$sql = "SELECT scans.id, place, amount, deaths, active, cured, time FROM `data` inner join scans on scans.id=data.scan WHERE place like ? group by amount order by time desc ";
|
||||
$stmt = $pdo->prepare($sql);
|
||||
$like = "%".trim($_GET['land'])."%";
|
||||
$stmt->bindParam(1, $like);
|
||||
$stmt->execute();
|
||||
$data = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
echo '<table>';
|
||||
echo '<tr><th>id</th><th>Scan-No</th><th>infected</th><th>dead</th><th>active</th><th>cured</th><th>time</th></tr>';
|
||||
foreach ($data as $row){
|
||||
echo '<tr>';
|
||||
foreach ($row as $item) {
|
||||
echo '<td>'.$item.'</td>';
|
||||
}
|
||||
echo '</tr>';
|
||||
}
|
||||
echo '</table>';
|
||||
}
|
Loading…
Reference in New Issue
Block a user