From fa45de43235dd040e7d64fb20819778f4dc5c27c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 20 Jun 2013 18:42:39 +0200 Subject: [PATCH] =?utf8?q?Fehler=20von=20Datenbankqueires=20=C3=BCber=20$s?= =?utf8?q?th->execute=20statt=20$DBI::err?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/USTVA.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/SL/USTVA.pm b/SL/USTVA.pm index a5db373ad..72bf0b16e 100644 --- a/SL/USTVA.pm +++ b/SL/USTVA.pm @@ -518,9 +518,7 @@ sub query_finanzamt { my $filename = "sql/$table.sql"; my $tst = $dbh->prepare("SELECT * FROM $table"); - $tst->execute; - if ($DBI::err) { - + $tst->execute || do { #There is no table, read the table from sql/finanzamt.sql print qq|

Bitte warten, Tabelle $table wird einmalig in Datenbank: $myconfig->{dbname} als Benutzer: $myconfig->{dbuser} hinzugefügt...

|; @@ -529,7 +527,7 @@ sub query_finanzamt { #execute second last call my $dbh = $form->dbconnect($myconfig) or $self->error(DBI->errstr); $dbh->disconnect(); - } + }; $tst->finish(); #$dbh->disconnect(); -- 2.20.1