query($strSQL);
$strTable="
";
if ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$strTable.="Fahrräder | ".$row['rad']." |
";
$strTable.="PKW | ".$row['pkw']." |
";
$strTable.="Fussgänger | ".$row['fuss']." |
";
$strTable.="Krafträder | ".$row['krad']." |
";
$strTable.="LKW | ".$row['lkw']." |
\n";
$strTable.="Sonstiges | ".$row['sonstiges']." |
\n";
}
$strSQL="SELECT count(*) as count FROM data
WHERE IstPKW=0 and IstFuss=0 and IstKrad=0 and IstGkfz=0 and IstSonstige=0".$strLocation;
$result = $db->query($strSQL." AND UJAHR=".$strYear);
if ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$strTable.="Alleinunfälle und Unfälle mit geicher Fahrzeugart | ".$row['count']." |
";
}
$strTable.="
";
return $strTable;
}
function get_unfalltyp($strWhere,$strYear,$strLocation){
global $db;
global $arrUnfalltyp;
$numVehicle=1;
$strSQL="SELECT UTYP1, count(UTYP1) as anz FROM data WHERE istRad=1 AND UJAHR=".$strYear.$strLocation." GROUP BY UTYP1";
$strTable="";
$result = $db->query($strSQL);
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$strTable.="".$arrUnfalltyp[$row['UTYP1']]." | ".$row['anz']." |
\n";
}
$strTable.="
";
return $strTable;
}
function get_unfallart($strWhere,$strYear,$strLocation){
global $db;
global $arrUnfallart;
$numVehicle=1;
$strSQL="SELECT UART, count(UART) as anz FROM data WHERE istRad=1 AND UJAHR=".$strYear.$strLocation." GROUP BY UART";
$strTable="";
$result = $db->query($strSQL);
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$strTable.="".$arrUnfallart[$row['UART']]." | ".$row['anz']." |
\n";
}
$strTable.="
";
return $strTable;
}