Commit 71a87cf1 authored by vogelor's avatar vogelor
Browse files

fixed a bug in deleting old log

parent 9d4a9fc2
......@@ -130,12 +130,12 @@ foreach($records as $rec) {
#######################################################################################################
//* Keep 7 days in sys_log
$tstamp = time() - (60*60*24*7);
$sql = "DELETE FROM sys_log WHERE tstamp < $tstamp AND server_id = ".$conf["server_id"];
$sql = "DELETE FROM sys_log WHERE tstamp < $tstamp AND server_id != 0";
$app->db->query($sql);
//* Keep 7 days in sys_datalog
$tstamp = time() - (60*60*24*7);
$sql = "DELETE FROM sys_datalog WHERE tstamp < $tstamp AND server_id = ".$conf["server_id"];
$sql = "DELETE FROM sys_datalog WHERE tstamp < $tstamp AND server_id != 0";
$app->db->query($sql);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment