From 82227819676e3d26d942c6e28eaa05ac1ee18497 Mon Sep 17 00:00:00 2001 From: Karl Burkhart Date: Thu, 25 Nov 2010 16:31:28 +0000 Subject: [PATCH] --- include/standort.class.php | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/include/standort.class.php b/include/standort.class.php index 31db88066..ef0737211 100644 --- a/include/standort.class.php +++ b/include/standort.class.php @@ -598,6 +598,47 @@ class standort extends basis_db } } + /** + * + * gibt alle Standorte eines bestimmten Typs zurück + * @param $typ + */ + public function getStandorteWithTyp($typ) + { + $qry ="select standort.* from public.tbl_firma as firma, public.tbl_adresse as adresse, public.tbl_standort as standort where + firma.firma_id = standort.firma_id and + standort.adresse_id = adresse.adresse_id and + firma.firmentyp_kurzbz = '".addslashes($typ)."';"; + + if($this->db_query($qry)) + { + while($row = $this->db_fetch_object()) + { + $standort = new standort(); + + $standort->standort_id = $row->standort_id; + $standort->firma_id = $row->firma_id; + $standort->adresse_id = $row->adresse_id; + $standort->kurzbz = $row->kurzbz; + $standort->bezeichnung = $row->bezeichnung; + $standort->insertvon = $row->insertvon; + $standort->insertamum = $row->insertamum; + $standort->updatevon = $row->updatevon; + $standort->updateamum = $row->updateamum; + + $this->result[] = $standort; + } + return true; + } + else + { + $this->errormsg="Fehler bei der Abfrage aufgetreten."; + return false; + } + + + } + } ?> \ No newline at end of file