From b5c6450b24b39a214b1d0507d9e582652655b1fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20K=C3=B6hler?= Date: Thu, 29 Jun 2006 15:26:13 +0000 Subject: [PATCH] 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 9c60d6395..8f2cfb35b 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -718,6 +718,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