From 3eabc72e27575ee19629ddc94714abc91c713f5f Mon Sep 17 00:00:00 2001 From: kindlm Date: Fri, 24 Feb 2017 17:19:03 +0100 Subject: [PATCH] OrderBy Param in Function load_persKontakttyp --- include/kontakt.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/kontakt.class.php b/include/kontakt.class.php index f7df1d755..5e9d907d3 100644 --- a/include/kontakt.class.php +++ b/include/kontakt.class.php @@ -270,7 +270,7 @@ class kontakt extends basis_db * @param kontakttyp * @return boolean */ - public function load_persKontakttyp($person_id, $kontakttyp) + public function load_persKontakttyp($person_id, $kontakttyp, $order = null) { if(!is_numeric($person_id)) { @@ -280,7 +280,10 @@ class kontakt extends basis_db $qry = "SELECT tbl_kontakt.*, tbl_firma.name as firma_name, tbl_firma.firma_id FROM public.tbl_kontakt LEFT JOIN public.tbl_standort USING(standort_id) LEFT JOIN public.tbl_firma USING(firma_id) WHERE person_id=".$this->db_add_param($person_id, FHC_INTEGER)." - AND kontakttyp =".$this->db_add_param($kontakttyp, FHC_STRING); + AND kontakttyp =".$this->db_add_param($kontakttyp, FHC_STRING); + + if ($order != null) + $qry .= " ORDER BY ".$order; if($this->db_query($qry)) {