X-Git-Url: https://ruin.nu/git/?p=ndwebbie.git;a=blobdiff_plain;f=scripts%2Fparseplanets.pl;h=518a887201661cc63a413332e9662e05ff7720e4;hp=a01377f1aa86df741ef15f35218852314310d872;hb=36a13cae169413fc04fbf704d94a2ad797336e6e;hpb=f56f84ac1689330801afc9e25fcd998ef8b39f33 diff --git a/scripts/parseplanets.pl b/scripts/parseplanets.pl index a01377f..518a887 100755 --- a/scripts/parseplanets.pl +++ b/scripts/parseplanets.pl @@ -22,11 +22,10 @@ q{ use strict; use warnings; +use local::lib; use DBI; use DBD::Pg qw(:pg_types); -use LWP::Simple; - use FindBin; use lib "$FindBin::Bin/../lib"; @@ -85,6 +84,7 @@ while (my @planet = $findplanets->fetchrow){ } my $intel = $dbh->prepare(q{INSERT INTO forum_posts (ftid,uid,message) VALUES( (SELECT ftid FROM planets WHERE pid = $2),$1,$3)}); +$dbh->do(q{DELETE FROM planet_stats WHERE tick = $1},undef,$tick); for my $planet (@planets) { #print "$planet->[1]\n"; my $oldPlanet = $oldStats{$planet->[1]};