12 our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
15 @EXPORT = qw(db_connect db_commit www_begin
25 $r->header_out("Cache-Control: no-cache");
30 foreach my $d (@INC) {
31 $dbf = "$d/data/away.db";
37 $dbh = DBI->connect("dbi:SQLite:$dbf",'','',
39 RaiseError=>1, ShowErrorStatement=>1
41 or die "$DBI::errstr ?";
46 my $sth= $dbh->prepare($stmt);
49 if ($row= $sth->fetchrow_hashref()) {
50 die("REFERENTIAL INTEGRITY ERROR\n".
51 "\n$stmt\n". Dumper($row),"\n");
56 nooutput("SELECT * FROM addresses LEFT JOIN config".
57 " USING (emailaddr) WHERE forwardfile IS NULL");
58 nooutput("SELECT * FROM addresses LEFT JOIN texts".
59 " USING (textid) WHERE desc IS NULL");