- $dbh->do("BEGIN");
-
- $dbh->do("CREATE TEMPORARY TABLE config (".
- " emailaddr TEXT PRIMARY KEY NOT NULL,".
- " username TEXT NOT NULL,".
- " forwardfile TEXT NOT NULL".
- ")");
-
- open C, "config" or die $!;
- while (<C>) {
- s/^\s+//;
- next if m/^\#/;
- chomp or die;
- s/\s+$//;
- my @s = split;
- die "$_ ?" unless @s==3;
- $dbh->do("INSERT INTO config".
- " (emailaddr, username, forwardfile)".
- " VALUES (?,?,?)",
- {}, @s);
+sub nooutput ($) {
+ my ($stmt) = @_;
+ my $sth= $dbh->prepare($stmt);
+ $sth->execute();
+ my $row;
+ if ($row= $sth->fetchrow_hashref()) {
+ die("REFERENTIAL INTEGRITY ERROR\n".
+ "\n$stmt\n". Dumper($row),"\n");