get "Id==*","../bg_d/bg_data";
while (get_next("../bg_d/bg_data"))
{
$Anzahl{$d_okey}++;
}
out "<table>";
out "<tr>\n";
out "<th>Ort</th>\n";
out "<th>Anzahl</th>\n";
out "</tr>\n";
$work_count = 0;
foreach $d_okey(sort {$a<=>$b}keys %Anzahl)
{
# $d_okey =~ s| |\\ |g; # Maskieren Leerzeichen für Suche
get "o_okey==$d_okey & o_okey2==1", "../bg_d/bg_orte";
if (($o_okey eq $d_okey) && ($o_okey2 eq "1"))
{
$work_ort = $o_ortgesamt; # Ortsname
}
else
{
$work_ort = "kein Ort! "; # Ortsname not found
}
$work_class = ($_loop %2 ? 'zeile1' : 'zeile2');
out "<tr class='$work_class'>";
out "<td class='a10'>$d_okey $work_ort</td>\n";
out "<td class='a10' style='text-align:right'>$Anzahl{$d_okey}</td>\n";
out "</tr>\n";
$work_count = $work_count + $Anzahl{$d_okey};
}
out "<tr class='zeile0'>";
out "<td class='a10'>Summe aller Adressen</td>\n";
out "<td class='a10' style='text-align:right'>$work_count</td>\n";
out "</tr>\n";
out "</table>";
out "Runtime : ";
out runtime();
---- schnapp ----