dadamssg Posted February 28, 2009 Share Posted February 28, 2009 is there a way you can set up somethin in your database to delete certain rows every 24 hrs. i have a database full of events and i want the database to erase the events that have expired, i know i could just create a control panel that only i could access in my website which could contain a delete button, but i want it to do it automatically Quote Link to comment https://forums.phpfreaks.com/topic/147362-solved-how-to-delete-every-24hrs/ Share on other sites More sharing options...
corbin Posted March 1, 2009 Share Posted March 1, 2009 Sounds like the perfect situation for a cron job. Quote Link to comment https://forums.phpfreaks.com/topic/147362-solved-how-to-delete-every-24hrs/#findComment-773640 Share on other sites More sharing options...
dadamssg Posted March 1, 2009 Author Share Posted March 1, 2009 cron? Quote Link to comment https://forums.phpfreaks.com/topic/147362-solved-how-to-delete-every-24hrs/#findComment-773648 Share on other sites More sharing options...
trq Posted March 1, 2009 Share Posted March 1, 2009 Its a Linux program designed to execute other Linux programs or scripts at a given time. This is exactly what you need. If your host supports cron they'll likey have a web interface to it. Otherwise, do you have shell access to your server? Quote Link to comment https://forums.phpfreaks.com/topic/147362-solved-how-to-delete-every-24hrs/#findComment-773654 Share on other sites More sharing options...
dadamssg Posted March 1, 2009 Author Share Posted March 1, 2009 awesome thanks man..im using justhost and they support it, now i just gotta do some research on how to set one up..thanks again Quote Link to comment https://forums.phpfreaks.com/topic/147362-solved-how-to-delete-every-24hrs/#findComment-773659 Share on other sites More sharing options...
landavia Posted March 1, 2009 Share Posted March 1, 2009 how about using a manual script everyday.. admin must click the script to manual remove the data Quote Link to comment https://forums.phpfreaks.com/topic/147362-solved-how-to-delete-every-24hrs/#findComment-773662 Share on other sites More sharing options...
dadamssg Posted March 1, 2009 Author Share Posted March 1, 2009 thought about that, but i want it to run like every hour Quote Link to comment https://forums.phpfreaks.com/topic/147362-solved-how-to-delete-every-24hrs/#findComment-774157 Share on other sites More sharing options...
jackpf Posted March 1, 2009 Share Posted March 1, 2009 how about using a manual script everyday.. admin must click the script to manual remove the data Cron is self maintaining. Much more reliable. Quote Link to comment https://forums.phpfreaks.com/topic/147362-solved-how-to-delete-every-24hrs/#findComment-774161 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.