From 9d6beb5df35b06f0d9d2dffcdcfdf6a808722fce Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 11 Aug 2008 08:32:08 +0000 Subject: [PATCH] =?utf8?q?Falsche=20Reihenfolge=20der=20SQL-Parameter=20so?= =?utf8?q?rgten=20f=C3=BCr=20Fehlermeldungen,=20wenn=20z.B.=20nach=20Betre?= =?utf8?q?ff=20gesucht=20wurde.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/FU.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/SL/FU.pm b/SL/FU.pm index c34a03129..b8edf580c 100644 --- a/SL/FU.pm +++ b/SL/FU.pm @@ -181,7 +181,8 @@ sub follow_ups { my ($query, $where, $where_user); my ($employee_id) = selectrow_query($form, $dbh, qq|SELECT id FROM employee WHERE login = ?|, $form->{login}); - my @values = ($employee_id, $employee_id); + my @values = (); + my @values_user = (); if ($params{trans_id}) { $where .= qq| AND EXISTS (SELECT * FROM follow_up_links ful @@ -238,7 +239,7 @@ sub follow_ups { if ($params{all_users}) { $where_user = qq|OR (fu.created_by IN (SELECT DISTINCT what FROM follow_up_access WHERE who = ?))|; - push @values, $employee_id; + push @values_user, $employee_id; } my $order_by = ''; @@ -269,7 +270,7 @@ sub follow_ups { $where $order_by|; - my $follow_ups = selectall_hashref_query($form, $dbh, $query, @values); + my $follow_ups = selectall_hashref_query($form, $dbh, $query, $employee_id, $employee_id, @values_user, @values); if (!scalar @{ $follow_ups }) { $main::lxdebug->leave_sub(); -- 2.20.1