]> ruin.nu Git - ndwebbie.git/blobdiff - scripts/parseplanets.pl
Remove the old stats automatically when parsing
[ndwebbie.git] / scripts / parseplanets.pl
index a01377f1aa86df741ef15f35218852314310d872..0c62298edc96f501b06907f383c30cbc048dcb1a 100755 (executable)
@@ -85,6 +85,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]};