}
$sth->finish () ;
- $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='s'" ;
+ $query = "SELECT relname FROM pg_class WHERE relname LIKE '$pattern' AND relkind='S'" ;
$sth = $dbh->prepare ($query) ;
$sth->execute () ;
while (@array = $sth->fetchrow_array ()) {
$dbh->commit () ;
}
- $version = &get_db_version ;
- $target = "0.2" ;
- if (is_lesser $version, $target) {
- debug "Adding local data." ;
-
- my $ip_address = qx/host $domain_name | awk '{print \}'/ ;
-
- @reqlist = (
- "INSERT INTO plugin_".$pluginname."_sample_data (domain, ip_address) VALUES ('$domain_name', '$ip_address')",
- ) ;
-
- foreach my $s (@reqlist) {
- $query = $s ;
- # debug $query ;
- $sth = $dbh->prepare ($query) ;
- $sth->execute () ;
- $sth->finish () ;
- }
- @reqlist = () ;
-
- &update_db_version ($target) ;
- debug "Committing." ;
- $dbh->commit () ;
- }
-
debug "It seems your database install/upgrade went well and smoothly. That's cool." ;
debug "Please enjoy using Debian GForge." ;