diff --git a/content/statistik/mitarbeiterexport.xls.php b/content/statistik/mitarbeiterexport.xls.php index 958b6fb5d..6bb5b60bf 100644 --- a/content/statistik/mitarbeiterexport.xls.php +++ b/content/statistik/mitarbeiterexport.xls.php @@ -157,7 +157,7 @@ array_multisort($nachname, SORT_ASC, $vorname, SORT_ASC, $mitarbeiterDAO->result } //Zustelladresse aus der Datenbank holen und dazuhaengen - $qry = "SELECT * FROM public.tbl_adresse WHERE person_id='$mitarbeiter->person_id' ORDER BY zustelladresse LIMIT 1"; + $qry = "SELECT * FROM public.tbl_adresse WHERE person_id='$mitarbeiter->person_id' ORDER BY zustelladresse DESC LIMIT 1"; if($result = pg_query($conn, $qry)) { if($row = pg_fetch_object($result)) diff --git a/content/statistik/studentenexport.xls.php b/content/statistik/studentenexport.xls.php index 53fba04a7..5dc0fc707 100644 --- a/content/statistik/studentenexport.xls.php +++ b/content/statistik/studentenexport.xls.php @@ -252,7 +252,7 @@ loadVariables($conn, $user); //Zustelladresse //Zustelladresse aus der Datenbank holen und dazuhaengen - $qry_1 = "SELECT * FROM public.tbl_adresse WHERE person_id='$row->person_id' ORDER BY zustelladresse LIMIT 1"; + $qry_1 = "SELECT * FROM public.tbl_adresse WHERE person_id='$row->person_id' ORDER BY zustelladresse DESC LIMIT 1"; if($result_1 = pg_query($conn, $qry_1)) { if($row_1 = pg_fetch_object($result_1))