in reply to Re: Log4perl: Create missing SQLite file and log to it
in thread Log4perl: Create missing SQLite file and log to it
Update: the sqlite_master table contains a lot of meta information about the DB. A lot more can be discovered than just whether a table exists or not. I am not an SQL guru, this is something I did last year to solve a problem. I had to do some stuff with the Brackets table, if it existed. Otherwise there were some rules about how to deal with situation.my $check_if_bracket_table = $dbh->prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'Brackets'"); $check_if_bracket_table->execute(); my $ref = $check_if_bracket_table -> fetchall_arrayref; if (@$ref >0){...} # the Bracket Table exists...
|
|---|