diff --git a/index.php b/index.php
index 07988ca..323d2b6 100644
--- a/index.php
+++ b/index.php
@@ -60,7 +60,6 @@
$strDescription=generate_tooltip_description($row);
-
$arrMarker[]="marker[".$id."] = [L.marker([".$numLat."," .$numLng."],"
." { icon: ".$arrMarkerType[$topic]." }),'check_".$topic."'];\n"
."marker[".$id."][0].addTo(mymap);\n "
@@ -134,12 +133,12 @@
diff --git a/lib/functions.php b/lib/functions.php
index 9c6cf0a..31381fb 100644
--- a/lib/functions.php
+++ b/lib/functions.php
@@ -82,4 +82,74 @@ function read_gps_location($file){
function nl2br2($string) {
$string = str_replace(array("\r\n", "\r", "\n"), "
", $string);
return $string;
- }
\ No newline at end of file
+ }
+
+
+ function get_statistics($numVehicle,$strWhere) {
+ global $db;
+ $strSQL="SELECT
+ sum(IstRad) as rad,
+ sum(IstPKW) as pkw,
+ sum(IstFuss) as fuss,
+ sum(IstKrad) as krad,
+ sum(IstGkfz) as lkw,
+ sum(IstSonstige) as sonstiges,
+ count(*) as summe
+ FROM Unfallorte2019_Hamm
+ WHERE ".$strWhere;
+
+ $result = $db->query($strSQL);
+
+ $strTable="
Unfallbeteiligte | Anzahl |
---|---|
Fahrräder | ".$row['rad']." |
PKWs | ".$row['pkw']." |
Fussgänger | ".$row['fuss']." |
Krafträder | ".$row['krad']." |
LKWs | ".$row['lkw']." |
Sonstiges | ".$row['sonstiges']." |
Alleinunfälle | ".$row['count']." |