summaryrefslogtreecommitdiffstats
path: root/Aufgabe7/db-passwd-create.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Aufgabe7/db-passwd-create.pl')
-rw-r--r--Aufgabe7/db-passwd-create.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/Aufgabe7/db-passwd-create.pl b/Aufgabe7/db-passwd-create.pl
index 0c9c470..5a43831 100644
--- a/Aufgabe7/db-passwd-create.pl
+++ b/Aufgabe7/db-passwd-create.pl
@@ -28,7 +28,7 @@ use DBI;
# Get database config
my %dbconf = do 'dbinc.pl';
-my $dbhandle = DBI->connect("DBI:mysql:host=$dbconf{dbhost};database=$dbconf{dbdatabase}", $dbconf{dbuser}, $dbconf{dbpasswd}) or die 'DB not accessible';
+my $dbhandle = DBI->connect("DBI:mysql:host=$dbconf{dbhost};database=$dbconf{dbdatabase}", $dbconf{dbuser}, $dbconf{dbpasswd}, {RaiseError=>1}) or die 'DB not accessible';
#Create DB
$dbhandle->do("CREATE TABLE stsuh_passwort
@@ -43,6 +43,6 @@ $dbhandle->do("CREATE TABLE stsuh_passwort
commandinterpreter CHAR(255),
PRIMARY KEY (nr)
)
-") or die 'Could not create database';
+") or die $dbhandle->errstr;
$dbhandle->disconnect;