From 68c90376e2ba127f0c0a00787cbe1aafdff947c6 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 10 Jan 2007 15:35:56 +0000 Subject: [PATCH] =?utf8?q?Query=20und=20Fehlermeldung=20zum=20L=C3=B6schen?= =?utf8?q?=20von=20Einheiten=20berichtigt.=20Fix=20f=C3=BCr=20Bug=20#495.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/AM.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SL/AM.pm b/SL/AM.pm index ddc0e5017..8fd79ad06 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -2240,10 +2240,11 @@ sub save_units { $dbh->do($query) || $form->dberror($query); if ($delete_units && (0 != scalar(@{$delete_units}))) { - $query = "DELETE FROM units WHERE name = ("; + $query = "DELETE FROM units WHERE name IN ("; map({ $query .= "?," } @{$delete_units}); substr($query, -1, 1) = ")"; - $dbh->do($query, undef, @{$delete_units}) || $form->dberror($query . " ($_)"); + $dbh->do($query, undef, @{$delete_units}) || + $form->dberror($query . " (" . join(", ", @{$delete_units}) . ")"); } $query = "UPDATE units SET name = ?, base_unit = ?, factor = ? WHERE name = ?"; -- 2.20.1