From 4f19857efd5a26253699b24a305176fda21b010a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 30 Mar 2009 15:52:54 +0000 Subject: [PATCH] =?utf8?q?Code=20aufger=C3=A4umt.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/CT.pm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/SL/CT.pm b/SL/CT.pm index b1c21ab22..7e81d66c4 100644 --- a/SL/CT.pm +++ b/SL/CT.pm @@ -761,17 +761,17 @@ if ($sortorder ne 'id') { $where .= qq| AND ($cvar_where)|; push @values, @cvar_values; } - # Um nach Straße in der Berichtsmaske zu suchen ... jb 13.11.2008 - if ($form->{addr_street}) { - $where .= qq| AND (street ILIKE ?)|; - push @values, ('%' . $form->{addr_street} . '%'); - } - - # Um nach PLZ in der Berichtsmaske zu suchen ... jb 13.11.2008 - if ($form->{addr_zipcode}) { - $where .= qq| AND (zipcode ILIKE ?)|; - push @values, ($form->{addr_zipcode} . '%'); - } + + if ($form->{addr_street}) { + $where .= qq| AND (street ILIKE ?)|; + push @values, '%' . $form->{addr_street} . '%'; + } + + if ($form->{addr_zipcode}) { + $where .= qq| AND (zipcode ILIKE ?)|; + push @values, $form->{addr_zipcode} . '%'; + } + my $query = qq|SELECT ct.*, b.description AS business | . qq|FROM $cv ct | . -- 2.20.1