I know its nor a permanent solution but im running the following every 30 mins via cron...
Code:<?php ## CUSTOMIZE SETTINGS FOR YOUR SITE ## $db_host = "localhost"; // Change this if your MySQL database host is different. $db_name = "db name"; // Change this to the name of your database. $db_user = "db user"; // Change this to your database username. $db_pw = "pass"; // Change this to your database password. $datecut = $_SERVER['REQUEST_TIME'] - (30*24*60*60); ####################################### // Connecting to your database mysql_connect($db_host, $db_user, $db_pw) OR die ("Cannot connect to your database"); mysql_select_db($db_name) OR die("Cannot connect to your database"); mysql_query("TRUNCATE TABLE `guest_info`"); # mysql_query("TRUNCATE TABLE `playlist`"); // un comment if you also don't want to track peoples entire playlists. ?>
Could should work ok, im no php expert so if there are errors I apologize but its working fine for me and speeded up the site a whole lot :D




Reply With Quote
Bookmarks