table grid

This commit is contained in:
Walter Hupfeld 2023-10-09 13:45:10 +02:00
parent e61783f572
commit fddabb11bb
2 changed files with 30 additions and 24 deletions

View File

@ -8,6 +8,7 @@
<link rel="stylesheet" href="../css/bootstrap.min.css"/>
<style>
.rechts {text-align:right;background-color:#eee;}
.l {border-left: 1px solid black; }
</style>
</head>
<body>
@ -19,16 +20,17 @@
<th colspan="4">Todesfälle</th>
<th colspan="4">Schwerverletzte</th>
<th colspan="4">Leichtverletzte</th>
<th></th><th></th><th></th>
<th class='l'>Fäche</th>
<th>Einw.</th>
<th>Quote</th>
</tr>
<tr><th>Kreis</th>
<th>2022</th><th>2021</th><th>2020</th><th>2019</th>
<th>2022</th><th>2021</th><th>2020</th><th>2019</th>
<th>2022</th><th>2021</th><th>2020</th><th>2019</th>
<th>2022</th><th>2021</th><th>2020</th><th>2019</th>
<th>Fäche</th><th>Einw. in Tausend</th>
<th>Quote</th>
<th class='l'>2022</th><th>2021</th><th>2020</th><th>2019</th>
<th class='l'>2022</th><th>2021</th><th>2020</th><th>2019</th>
<th class='l'>2022</th><th>2021</th><th>2020</th><th>2019</th>
<th class='l'>2022</th><th>2021</th><th>2020</th><th>2019</th>
<th class='l' colspan="2">in Tausend</th><th></th>
</tr>
<?php
@ -69,23 +71,23 @@ $result=$db->query($strSQL);
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
echo "<tr>";
echo "<td>".$row['Gemeinde']."</td>";
echo "<td>".$row['Jahr_2022']."</td>";
echo "<td class='l'>".$row['Jahr_2022']."</td>";
echo "<td>".$row['Jahr_2021']."</td>";
echo "<td>".$row['Jahr_2020']."</td>";
echo "<td>".$row['Jahr_2019']."</td>";
echo "<td>".$row['Tode_2022']."</td>";
echo "<td class='l'>".$row['Tode_2022']."</td>";
echo "<td>".$row['Tode_2021']."</td>";
echo "<td>".$row['Tode_2020']."</td>";
echo "<td>".$row['Tode_2019']."</td>";
echo "<td>".$row['Schwerverletzt_2022']."</td>";
echo "<td class='l'>".$row['Schwerverletzt_2022']."</td>";
echo "<td>".$row['Schwerverletzt_2021']."</td>";
echo "<td>".$row['Schwerverletzt_2020']."</td>";
echo "<td>".$row['Schwerverletzt_2019']."</td>";
echo "<td>".$row['Leichtverletzt_2022']."</td>";
echo "<td class='l'>".$row['Leichtverletzt_2022']."</td>";
echo "<td>".$row['Leichtverletzt_2021']."</td>";
echo "<td>".$row['Leichtverletzt_2020']."</td>";
echo "<td>".$row['Leichtverletzt_2019']."</td>";
echo "<td class='rechts'>".$row['Flaeche']."</td>";
echo "<td class='rechts l'>".$row['Flaeche']."</td>";
echo "<td class='rechts'>".round($row['Einwohner']/1000,1)."</td>";
echo "<td class='rechts'>".round($row['Quote_2022'],2)."</td>";
echo "</tr>\n";

View File

@ -6,6 +6,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Fahrrad-Unfallstatistik NRW</title>
<link rel="stylesheet" href="../css/bootstrap.min.css"/>
<style>
.rechts {text-align:right;}
.l {border-left: 1px solid black; }
</style>
</head>
<body>
<div class="container my-5">
@ -19,11 +23,11 @@
<th></th><th></th>
</tr>
<tr><th>Kreis</th>
<th>2022</th><th>2021</th><th>2020</th><th>2019</th>
<th>2022</th><th>2021</th><th>2020</th><th>2019</th>
<th>2022</th><th>2021</th><th>2020</th><th>2019</th>
<th>2022</th><th>2021</th><th>2020</th><th>2019</th>
<th>Einw. in Tausend</th><th>Quote</th>
<th class="l">2022</th><th>2021</th><th>2020</th><th>2019</th>
<th class="l">2022</th><th>2021</th><th>2020</th><th>2019</th>
<th class="l">2022</th><th>2021</th><th>2020</th><th>2019</th>
<th class="l">2022</th><th>2021</th><th>2020</th><th>2019</th>
<th class="l">Einw. in Tausend</th><th>Quote</th>
</tr>
@ -64,24 +68,24 @@ $result=$db->query($strSQL);
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
echo "<tr>";
echo "<td>".$row['Kreis']."</td>";
echo "<td>".$row['Jahr_2022']."</td>";
echo "<td class='l'>".$row['Jahr_2022']."</td>";
echo "<td>".$row['Jahr_2021']."</td>";
echo "<td>".$row['Jahr_2020']."</td>";
echo "<td>".$row['Jahr_2019']."</td>";
echo "<td>".$row['Tode_2022']."</td>";
echo "<td class='l'>".$row['Tode_2022']."</td>";
echo "<td>".$row['Tode_2021']."</td>";
echo "<td>".$row['Tode_2020']."</td>";
echo "<td>".$row['Tode_2019']."</td>";
echo "<td>".$row['Schwerverletzt_2022']."</td>";
echo "<td class='l'>".$row['Schwerverletzt_2022']."</td>";
echo "<td>".$row['Schwerverletzt_2021']."</td>";
echo "<td>".$row['Schwerverletzt_2020']."</td>";
echo "<td>".$row['Schwerverletzt_2019']."</td>";
echo "<td>".$row['Leichtverletzt_2022']."</td>";
echo "<td class='l'>".$row['Leichtverletzt_2022']."</td>";
echo "<td>".$row['Leichtverletzt_2021']."</td>";
echo "<td>".$row['Leichtverletzt_2020']."</td>";
echo "<td>".$row['Leichtverletzt_2019']."</td>";
echo "<td>".round($row['Population']/1000,0)."</td>";
echo "<td>".round($row['Quote_2022'],2)."</td>";
echo "<td class='l rechts'>".round($row['Population']/1000,0)."</td>";
echo "<td class='rechts'>".round($row['Quote_2022'],2)."</td>";
echo "</tr>\n";
}
echo "</table>\n";