From 88e25524b30984ae614dfe48c865b9e3e15b1e2f Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 22 Jul 2020 00:48:45 +0200 Subject: [PATCH] person/Benutzerfunktion_model.php getBenutzerFunktionByUid method: added organisationseinheit_bezeichnung to Benutzerfunktionen, added sorting order (datumbis, datumvon) --- application/models/person/Benutzerfunktion_model.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/application/models/person/Benutzerfunktion_model.php b/application/models/person/Benutzerfunktion_model.php index 485f0e9a5..27f9b6184 100644 --- a/application/models/person/Benutzerfunktion_model.php +++ b/application/models/person/Benutzerfunktion_model.php @@ -24,7 +24,8 @@ class Benutzerfunktion_model extends DB_Model { $params = array($uid); - $qry = "SELECT tbl_benutzerfunktion.*, tbl_organisationseinheit.organisationseinheittyp_kurzbz + $qry = "SELECT tbl_benutzerfunktion.*, tbl_organisationseinheit.bezeichnung as organisationseinheit_bezeichnung, + tbl_organisationseinheit.organisationseinheittyp_kurzbz FROM public.tbl_benutzerfunktion LEFT JOIN public.tbl_organisationseinheit USING(oe_kurzbz) WHERE uid=?"; @@ -44,7 +45,7 @@ class Benutzerfunktion_model extends DB_Model $params[] = $endeZeitraum; } - $qry .= ";"; + $qry .= "ORDER BY datum_bis NULLS LAST, datum_von NULLS LAST;"; return $this->execQuery($qry, $params); }