From 142659186992748606eb88b5ff5b5778a649bbfa Mon Sep 17 00:00:00 2001 From: jbousquie Date: Fri, 9 Dec 2016 14:42:29 +0100 Subject: [PATCH] wtf --- proxy/squid.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/squid.php b/proxy/squid.php index ef4f827..fc9591c 100644 --- a/proxy/squid.php +++ b/proxy/squid.php @@ -14,7 +14,7 @@ if (!empty($con_ip)) { $db = db_connect(); $req_log = 'INSERT INTO proxy (ip, username, target, logts) VALUES ( "'.$ip.'", "'.$username.'", "'.$target.'", CURRENT_TIMESTAMP() )'; -$req_purge = 'DELETE from proxy WHERE timestampdiff(SECOND, timestamp(logts), timestamp(now())) > 60'; // on purge les logs de plus de 1mn +$req_purge = 'DELETE from proxy WHERE TIMESTAMPDIFF( SECOND, TIMESTAMP( logts ), TIMESTAMP( now() ) ) > 600'; // on purge les logs de plus de 10mn $res = db_query($db, $req_purge); $res = db_query($db, $req_log); ?>