From 2230017cdb83316b1ff992fd6a2205bff8229fdd Mon Sep 17 00:00:00 2001 From: Robin Kupper Date: Thu, 14 Apr 2011 12:22:05 +0200 Subject: [PATCH] Fixed displaying wrong count of deleted log. --- src/de/diddiz/LogBlock/ClearLog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/de/diddiz/LogBlock/ClearLog.java b/src/de/diddiz/LogBlock/ClearLog.java index ec1a7fa..714cd75 100644 --- a/src/de/diddiz/LogBlock/ClearLog.java +++ b/src/de/diddiz/LogBlock/ClearLog.java @@ -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) {