|
|
|
@ -11,8 +11,6 @@ function generate_tooltip_description($row) {
|
|
|
|
|
global $arrWochentage;
|
|
|
|
|
global $db;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$strDescription = "<h3>Daten zum Unfall</h3>";
|
|
|
|
|
$description = "<strong>Unfallkategorie:</strong> ".$arrCategory[$row['UKATEGORIE']]."<br>";
|
|
|
|
@ -85,7 +83,7 @@ function nl2br2($string) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function get_statistics($numVehicle,$strWhere) {
|
|
|
|
|
function get_statistics($numVehicle,$strWhere,$strYear) {
|
|
|
|
|
global $db;
|
|
|
|
|
global $arrUnfallart;
|
|
|
|
|
global $arrUnfalltyp;
|
|
|
|
@ -97,8 +95,8 @@ function nl2br2($string) {
|
|
|
|
|
sum(IstGkfz) as lkw,
|
|
|
|
|
sum(IstSonstige) as sonstiges,
|
|
|
|
|
count(*) as summe
|
|
|
|
|
FROM Unfallorte2019_Hamm
|
|
|
|
|
WHERE ".$strWhere;
|
|
|
|
|
FROM Unfallorte_Hamm
|
|
|
|
|
WHERE ".$strWhere.$strYear;
|
|
|
|
|
|
|
|
|
|
$result = $db->query($strSQL);
|
|
|
|
|
|
|
|
|
@ -115,38 +113,38 @@ function nl2br2($string) {
|
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
|
$strSQL="SELECT count(*) as count
|
|
|
|
|
FROM Unfallorte2019_Hamm
|
|
|
|
|
FROM Unfallorte_Hamm
|
|
|
|
|
WHERE IstRad=0 and IstPKW=0 and IstFuss=0 and IstKrad=0 and IstGkfz=0 and IstSonstige=0";
|
|
|
|
|
*/
|
|
|
|
|
switch ($numVehicle) {
|
|
|
|
|
case 1:
|
|
|
|
|
case 0:
|
|
|
|
|
$strSQL="SELECT count(*) as count FROM Unfallorte2019_Hamm
|
|
|
|
|
$strSQL="SELECT count(*) as count FROM Unfallorte_Hamm
|
|
|
|
|
WHERE IstPKW=0 and IstFuss=0 and IstKrad=0 and IstGkfz=0 and IstSonstige=0";
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
$strSQL="SELECT count(*) as count FROM Unfallorte2019_Hamm
|
|
|
|
|
$strSQL="SELECT count(*) as count FROM Unfallorte_Hamm
|
|
|
|
|
WHERE IstRad=0 and IstFuss=0 and IstKrad=0 and IstGkfz=0 and IstSonstige=0";
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
$strSQL="SELECT count(*) as count FROM Unfallorte2019_Hamm
|
|
|
|
|
$strSQL="SELECT count(*) as count FROM Unfallorte_Hamm
|
|
|
|
|
WHERE IstPKW=0 and IstRad=0 and IstKrad and IstGkfz=0 and IstSonstige=0";
|
|
|
|
|
break;
|
|
|
|
|
case 4:
|
|
|
|
|
$strSQL="SELECT count(*) as count FROM Unfallorte2019_Hamm
|
|
|
|
|
$strSQL="SELECT count(*) as count FROM Unfallorte_Hamm
|
|
|
|
|
WHERE IstPKW=0 and IstFuss=0 and IstRad=0 and IstGkfz=0 and IstSonstige=0";
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
$strSQL="SELECT count(*) as count FROM Unfallorte2019_Hamm
|
|
|
|
|
$strSQL="SELECT count(*) as count FROM Unfallorte_Hamm
|
|
|
|
|
WHERE IstPKW=0 and IstFuss=0 and IstKrad=0 and IstRad=0 and IstSonstige=0";
|
|
|
|
|
break;
|
|
|
|
|
case 6:
|
|
|
|
|
$strSQL="SELECT count(*) as count FROM Unfallorte2019_Hamm
|
|
|
|
|
$strSQL="SELECT count(*) as count FROM Unfallorte_Hamm
|
|
|
|
|
WHERE IstPKW=0 and IstFuss=0 and IstKrad=0 and IstGkfz=0 and IstRad=0";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$result = $db->query($strSQL);
|
|
|
|
|
$result = $db->query($strSQL.$strYear);
|
|
|
|
|
if ($row = $result->fetchArray()) {
|
|
|
|
|
$strTable.="<tr><td>Alleinunfälle und Unfälle mit geicher Fahrzeugart</td><td>".$row['count']."</td></tr>";
|
|
|
|
|
}
|
|
|
|
@ -154,7 +152,7 @@ function nl2br2($string) {
|
|
|
|
|
|
|
|
|
|
//Unfallart
|
|
|
|
|
|
|
|
|
|
$strSQL="SELECT UART, count(UART) as anz FROM Unfallorte2019_Hamm WHERE ".$strWhere." GROUP BY UART";
|
|
|
|
|
$strSQL="SELECT UART, count(UART) as anz FROM Unfallorte_Hamm WHERE ".$strWhere.$strYear." GROUP BY UART";
|
|
|
|
|
$strTable.="<h5>Unfallart</h5>";
|
|
|
|
|
$strTable.="<table class='statistik'>";
|
|
|
|
|
$result = $db->query($strSQL);
|
|
|
|
@ -165,7 +163,7 @@ function nl2br2($string) {
|
|
|
|
|
|
|
|
|
|
//Unfallart
|
|
|
|
|
|
|
|
|
|
$strSQL="SELECT UTYP1, count(UTYP1) as anz FROM Unfallorte2019_Hamm WHERE ".$strWhere." GROUP BY UTYP1";
|
|
|
|
|
$strSQL="SELECT UTYP1, count(UTYP1) as anz FROM Unfallorte_Hamm WHERE ".$strWhere.$strYear." GROUP BY UTYP1";
|
|
|
|
|
$strTable.="<h5>Unfalltyp</h5>";
|
|
|
|
|
$strTable.="<table class='statistik'>";
|
|
|
|
|
$result = $db->query($strSQL);
|
|
|
|
|