You do not need to empty the whole table as that logs everyone out. You can use this query:
Or simply:
MySQL/MariaDB has event scheduler, I haven't used it but you can schedule the query to run every 30 minutes or whatever time frame you want.
Code:
DELETE FROM phpbb_sessions WHERE session_last_visit <= UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 1 HOUR)) AND session_user_id = 1;Code:
DELETE FROM phpbb_sessions WHERE session_user_id = 1;Statistics: Posted by thecoalman — Thu May 08, 2025 6:28 am