From f8d2d00e20b838a0c048f0804b909e64b66e00b1 Mon Sep 17 00:00:00 2001 From: Karl Burkhart Date: Tue, 16 Nov 2010 12:01:43 +0000 Subject: [PATCH] --- include/firma.class.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/firma.class.php b/include/firma.class.php index 40f1580b2..a267048b3 100644 --- a/include/firma.class.php +++ b/include/firma.class.php @@ -357,10 +357,18 @@ class firma extends basis_db * Laedt alle Firmen * @return true wenn ok, false im Fehlerfall */ - public function getAll() + public function getAll($firma_search = null) { - $qry = "SElECT * FROM public.tbl_firma ORDER BY name"; + $qry = "SElECT * FROM public.tbl_firma"; + if (!empty($firma_search)) + { + $qry.= " WHERE "; + $matchcode=mb_strtoupper(addslashes(str_replace(array('<','>',' ',';','*','_','-',',',"'",'"'),"%",$firma_search))); + $qry.=" UPPER(trim(public.tbl_firma.name)) like '%".$matchcode."%'"; + } + + $qry.= " ORDER BY NAME"; if($this->db_query($qry)) { while($row = $this->db_fetch_object())