execute(" DELETE FROM arrowchat WHERE (arrowchat.read = 1 AND ('" . time() . "' - arrowchat.sent) > 10800) OR (arrowchat.read = 0 AND ('" . time() . "' - arrowchat.sent) > 604800) "); // ###################### CLEAN CHAT ROOM MESSAGES ####################### // Deletes 3+ hour old messages, you can adjust the 10800 seconds below $db->execute(" DELETE FROM arrowchat_chatroom_messages WHERE ('" . time() . "' - arrowchat_chatroom_messages.sent) > 10800 "); // ######################## CLEAN NOTIFICATIONS ########################## // Deletes 5+ day old messages, you can adjust the 432000 seconds below $db->execute(" DELETE FROM arrowchat_notifications WHERE arrowchat_notifications.user_read = 1 AND ('" . time() . "' - arrowchat_notifications.alert_time) > 432000 "); ?>