forked from LogBlock/LogBlock
Fixed displaying wrong count of deleted log.
This commit is contained in:
@@ -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);
|
String time = new SimpleDateFormat("yy-MM-dd-HH-mm-ss").format(System.currentTimeMillis() - LogBlock.config.keepLogDays*86400000);
|
||||||
ResultSet rs;
|
ResultSet rs;
|
||||||
for (String table : LogBlock.config.tables.values()) {
|
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();
|
rs.next();
|
||||||
int deleted = rs.getInt(1);
|
int deleted = rs.getInt(1);
|
||||||
if (deleted > 0) {
|
if (deleted > 0) {
|
||||||
|
Reference in New Issue
Block a user