Fixed displaying wrong count of deleted log.

This commit is contained in:
Robin Kupper
2011-04-14 12:22:05 +02:00
parent a28c0fd5f3
commit 2230017cdb

View File

@@ -31,7 +31,7 @@ public class ClearLog implements Runnable
String time = new SimpleDateFormat("yy-MM-dd-HH-mm-ss").format(System.currentTimeMillis() - LogBlock.config.keepLogDays*86400000);
ResultSet rs;
for (String table : LogBlock.config.tables.values()) {
rs = state.executeQuery("SELECT count(*) FROM `" + table + "` WHERE date < now()");
rs = state.executeQuery("SELECT count(*) FROM `" + table + "` WHERE date < '" + time + "'");
rs.next();
int deleted = rs.getInt(1);
if (deleted > 0) {