From ecdb10646b89f6dec27cc140e9184086ea4210af Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 20 Nov 2012 14:11:22 +0100 Subject: [PATCH] =?utf8?q?Zuerst=20l=C3=B6schen,=20dann=20Statement=20f?= =?utf8?q?=C3=BCr=20INSERT=20preparen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Betrifft #2063. --- SL/FU.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/FU.pm b/SL/FU.pm index 27836e0ad..a005c1814 100644 --- a/SL/FU.pm +++ b/SL/FU.pm @@ -426,11 +426,11 @@ sub save_access_rights { my ($id) = selectrow_query($form, $dbh, qq|SELECT id FROM employee WHERE login = ?|, $form->{login}); + do_query($form, $dbh, qq|DELETE FROM follow_up_access WHERE what = ?|, $id); + my $query = qq|INSERT INTO follow_up_access (who, what) VALUES (?, ?)|; my $sth = prepare_query($form, $dbh, $query); - do_query($form, $dbh, qq|DELETE FROM follow_up_access WHERE what = ?|, $id); - while (my ($who, $access_allowed) = each %{ $params{access} }) { next unless ($access_allowed); -- 2.20.1