Unfallkategorie
This commit is contained in:
parent
592e8514da
commit
b03ae9e7a5
@ -87,6 +87,20 @@ function nl2br2($string) {
|
|||||||
global $db;
|
global $db;
|
||||||
global $arrUnfallart;
|
global $arrUnfallart;
|
||||||
global $arrUnfalltyp;
|
global $arrUnfalltyp;
|
||||||
|
global $arrCategory;
|
||||||
|
|
||||||
|
$strTable="<h5>Unfallkategorie</h5>";
|
||||||
|
$strTable.="<table class='statistik'>";
|
||||||
|
$strSQL="SELECT UKATEGORIE, count(UKATEGORIE) as anz FROM Unfallorte_Hamm WHERE ".$strWhere.$strYear." GROUP BY UKATEGORIE";
|
||||||
|
$result = $db->query($strSQL);
|
||||||
|
|
||||||
|
while ($row = $result->fetchArray()) {
|
||||||
|
$strTable.="<tr><td>".$arrCategory[$row['UKATEGORIE']]."</td><td>".$row['anz']."</td></tr>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$strTable.="</table>";
|
||||||
|
|
||||||
|
|
||||||
$strSQL="SELECT
|
$strSQL="SELECT
|
||||||
sum(IstRad) as rad,
|
sum(IstRad) as rad,
|
||||||
sum(IstPKW) as pkw,
|
sum(IstPKW) as pkw,
|
||||||
@ -99,9 +113,9 @@ function nl2br2($string) {
|
|||||||
WHERE ".$strWhere.$strYear;
|
WHERE ".$strWhere.$strYear;
|
||||||
|
|
||||||
$result = $db->query($strSQL);
|
$result = $db->query($strSQL);
|
||||||
|
$strTable.="<h5>Unfallbeteiligte</h5>";
|
||||||
$strTable="<table class='statistik'>";
|
$strTable.="<table class='statistik'>";
|
||||||
$strTable.="<tr><th>Unfallbeteiligte</th><th>Anzahl</th></tr>";
|
//$strTable.="<tr><th>Unfallbeteiligte</th><th>Anzahl</th></tr>";
|
||||||
while ($row = $result->fetchArray()) {
|
while ($row = $result->fetchArray()) {
|
||||||
$strTable.="<tr><td>Fahrräder</td><td>".$row['rad']."</td></tr>";
|
$strTable.="<tr><td>Fahrräder</td><td>".$row['rad']."</td></tr>";
|
||||||
$strTable.="<tr><td>PKWs</td><td>".$row['pkw']."</td></tr>";
|
$strTable.="<tr><td>PKWs</td><td>".$row['pkw']."</td></tr>";
|
||||||
|
Loading…
Reference in New Issue
Block a user