status von neusten scan anzeigen
This commit is contained in:
parent
24af813296
commit
2625a94bfc
13
status.php
13
status.php
@ -1,9 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
include 'config.php';
|
include 'config.php';
|
||||||
|
|
||||||
$sql = "SELECT data.id, place, amount FROM `data` INNER JOIN scans on scans.id=data.scan INNER JOIN sites on sites.id=scans.site WHERE sites.id=2 ORDER BY amount DESC";
|
echo 'Stand in Deutschland:';
|
||||||
|
|
||||||
|
$sql = "SELECT id, place, amount FROM `data` WHERE scan=(SELECT MAX(id) FROM `scans` WHERE site=1) and place like 'D-%' ORDER BY amount DESC";
|
||||||
echo '<table>';
|
echo '<table>';
|
||||||
foreach ($pdo->query($sql) as $row){
|
foreach ($pdo->query($sql) as $row){
|
||||||
echo '<tr><td>'.$row['id'].'</td><td>'.$row['place'].'</td><td>'.$row['amount'].'</td></tr>';
|
echo '<tr><td>'.str_replace("D-", "", $row['place']).'</td><td>'.$row['amount'].'</td></tr>';
|
||||||
|
}
|
||||||
|
echo '<table>';
|
||||||
|
echo '<br><br>';
|
||||||
|
$sql = "SELECT id, place, amount FROM `data` WHERE scan=(SELECT MAX(id) FROM `scans` WHERE site=2) ORDER BY amount DESC";
|
||||||
|
echo '<table>';
|
||||||
|
foreach ($pdo->query($sql) as $row){
|
||||||
|
echo '<tr><td>'.$row['place'].'</td><td>'.$row['amount'].'</td></tr>';
|
||||||
}
|
}
|
||||||
echo '<table>';
|
echo '<table>';
|
Loading…
Reference in New Issue
Block a user