npsari Posted December 7, 2009 Share Posted December 7, 2009 Hello all, I have a mySQL table which is called 'data' I want to empty this table once everyday I want to empty it when my server time is 00:00 But the problem is, I am sleeping at this time How can I run a PHP script which will do it for me while I am sleeping I dont want to wake up and do it manually :-\ I want a PHP script which will do it when the server times hits 00:00 (or a new date) Can you help me mysql_query("DELETE FROM data WHERE data_id>'0' "); Quote Link to comment https://forums.phpfreaks.com/topic/184219-awake-script-while-iam-sleeping/ Share on other sites More sharing options...
greatstar00 Posted December 7, 2009 Share Posted December 7, 2009 does your server support cron job? Quote Link to comment https://forums.phpfreaks.com/topic/184219-awake-script-while-iam-sleeping/#findComment-972603 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.