From ed0a7b777770a962d2fb5835faa08216ad56ec66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Mon, 30 Jan 2023 13:54:20 +0100 Subject: [PATCH] add chat message deletion after 24 hours --- index.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.php b/index.php index afaf58b..b11cf25 100755 --- a/index.php +++ b/index.php @@ -20,6 +20,11 @@ $stmt2 = $mysqli->prepare("DELETE FROM Connections WHERE TimestampPing < (CURREN $stmt2->execute(); $stmt2->store_result(); +$stmt20 = $mysqli->prepare("DELETE FROM Chat WHERE Timestamp < (CURRENT_TIMESTAMP - 86400);"); +$stmt2->execute(); +$stmt2->store_result(); + + if (!empty($_GET["adder"])){ if ($_SERVER['REQUEST_METHOD'] == 'POST') { $heslo = trim($_POST['heslo']);