Skip to content
Snippets Groups Projects
Commit 71a87cf1 authored by vogelor's avatar vogelor
Browse files

fixed a bug in deleting old log

parent 9d4a9fc2
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment