Diff for /loncom/metadata_database/cleanup_database.pl between versions 1.5 and 1.7

version 1.5, 2006/08/10 20:07:01 version 1.7, 2006/11/20 17:07:57
Line 119  unless ($dbh = DBI->connect("DBI:mysql:l Line 119  unless ($dbh = DBI->connect("DBI:mysql:l
   
 my $sth = $dbh->prepare("SHOW TABLE STATUS");  my $sth = $dbh->prepare("SHOW TABLE STATUS");
 $sth->execute();  $sth->execute();
 my $results = $sth->fetchall_hashref(['Name']);  my $results = $sth->fetchall_hashref('Name');
   
 foreach my $name (keys(%$results)) {  foreach my $name (keys(%$results)) {
     next if ($results->{$name}{Comment} ne 'temporary');       next if ($results->{$name}{Comment} ne 'temporary'); 
Line 132  foreach my $name (keys(%$results)) { Line 132  foreach my $name (keys(%$results)) {
         $dbh->do('DROP TABLE '.$name);          $dbh->do('DROP TABLE '.$name);
     }      }
 }  }
   $sth->finish();
   
 # --------------------------------------------------- Close database connection  # --------------------------------------------------- Close database connection
 $dbh->disconnect;  $dbh->disconnect;

Removed from v.1.5  
changed lines
  Added in v.1.7


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>