From: Moritz Bunkus Date: Wed, 10 Jan 2007 15:35:56 +0000 (+0000) Subject: Query und Fehlermeldung zum Löschen von Einheiten berichtigt. Fix für Bug #495. X-Git-Tag: release-2.4.1~1^2~69 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=68c90376e2ba127f0c0a00787cbe1aafdff947c6;p=kivitendo-erp.git Query und Fehlermeldung zum Löschen von Einheiten berichtigt. Fix für Bug #495. --- 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 = ?";