sub TableExists {
my $table = shift;
eval {
local $dbh->{PrintError} = 0;
local $dbh->{RaiseError} = 1;
local $dbh->{RaiseError} = 0;
$dbh->do(qq{SELECT * FROM $table WHERE 1 = 0 });
};
return 1 unless $@;
return 0;
}
1;
-