]> ruin.nu Git - ndwebbie.git/blobdiff - scripts/parsegalaxies.pl
Remove the old stats automatically when parsing
[ndwebbie.git] / scripts / parsegalaxies.pl
index 0ba0f0cb160df372c08ed88ad182cc6ecb412e15..f9b6af758c2dbef6bbb56b9617503c6f4c9439a8 100755 (executable)
@@ -77,6 +77,7 @@ my $insert = $dbh->prepare(q{INSERT INTO galaxies(tick, x, y,
        sizerank_gain_day, scorerank_gain_day, valuerank_gain_day, xprank_gain_day,
        planets,planets_gain,planets_gain_day
        ) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)});
+$dbh->do(q{DELETE FROM galaxies WHERE tick = $1},undef,$tick);
 my $countplanets = $dbh->prepare(q{SELECT count(*) from planet_stats where x = $1 and y = $2 and tick = $3});
 for my $galaxy (@galaxies) {