From 4eed084df35cd4abd5599877a14bf815a89a7c91 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 22 Nov 2006 16:34:39 +0000 Subject: [PATCH] Recommit von r1163 von skoehler: Bug Ware liess sich nicht loeschen -foreign key constraint Error, Preisgruppenpreise wurden nicht geloescht --- SL/IC.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SL/IC.pm b/SL/IC.pm index 74e71cefd..d486228e6 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -797,6 +797,11 @@ sub delete { # connect to database, turn off AutoCommit my $dbh = $form->dbconnect_noauto($myconfig); + # first delete prices of pricegroup + my $query = qq|DELETE FROM prices + WHERE parts_id = $form->{id}|; + $dbh->do($query) || $form->dberror($query); + my $query = qq|DELETE FROM parts WHERE id = $form->{id}|; $dbh->do($query) || $form->dberror($query); -- 2.20.1