From: Moritz Bunkus Date: Tue, 20 Nov 2012 13:11:22 +0000 (+0100) Subject: Zuerst löschen, dann Statement für INSERT preparen X-Git-Tag: release-3.0.0beta2~11^2~1 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ecdb10646b89f6dec27cc140e9184086ea4210af;p=kivitendo-erp.git Zuerst löschen, dann Statement für INSERT preparen Betrifft #2063. --- 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);