is there any way to purge data daily from mysql ? I have a few tables that i would like cleared everyday automatically from mysql. any help is greatly appreciated. thanks, jay
You could create a cron job that ran at the end of each day that purged data form tables either by using DELETE FROM or TRUNCATE TABLE (if you want to purge all data).
yes i found out how to do it, last night i did the php files but im having a problem getting crons to run them.
Well create a cron job and the command should be something like: /usr/bin/php -f /var/www/webspace/script.php > /dev/null 2>&1 /usr/bin/php -f is the path to PHP /var/www/webspace/script.php is the path to the script /dev/null 2>&1 is the path to send output
not working, problem is if i try to run the files direct like xxxxx.com/sample.php it does not work, i have to run them like this xxxxx.com/sample so when i put the .php extension in the cron path it says file not found.
Is the php file executable? chmod +x name_of.php Does it have the interpreter in the first line? #!/usr/local/bin/php