add chat message deletion after 24 hours

This commit is contained in:
2023-01-30 13:54:20 +01:00
parent ea2f2bf342
commit ed0a7b7777

View File

@@ -20,6 +20,11 @@ $stmt2 = $mysqli->prepare("DELETE FROM Connections WHERE TimestampPing < (CURREN
$stmt2->execute(); $stmt2->execute();
$stmt2->store_result(); $stmt2->store_result();
$stmt20 = $mysqli->prepare("DELETE FROM Chat WHERE Timestamp < (CURRENT_TIMESTAMP - 86400);");
$stmt2->execute();
$stmt2->store_result();
if (!empty($_GET["adder"])){ if (!empty($_GET["adder"])){
if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$heslo = trim($_POST['heslo']); $heslo = trim($_POST['heslo']);