fixed trivial errors

This commit is contained in:
hjp 2013-11-26 21:51:49 +00:00
parent b2eb491d08
commit 055cc98b3a
1 changed files with 2 additions and 2 deletions

View File

@ -16,13 +16,13 @@ my $ca = Simba::CA->new({
my $dbh = $ca->{dbh}; my $dbh = $ca->{dbh};
for my $session (@ARGV[0]) { for my $session (@ARGV) {
print "deleting session $session\n"; print "deleting session $session\n";
my $n_instances = $dbh->do("delete from instances where session=?", {}, $session); my $n_instances = $dbh->do("delete from instances where session=?", {}, $session);
print "\t$n_instances instances deleted\n"; print "\t$n_instances instances deleted\n";
# remove orphaned records: # remove orphaned records:
$sessions my $sessions
= $dbh->selectcol_arrayref( = $dbh->selectcol_arrayref(
q{select s.id from instances i right outer join sessions s on i.session=s.id where i.id is null} q{select s.id from instances i right outer join sessions s on i.session=s.id where i.id is null}
); );