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 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. 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? 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? 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 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 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 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. 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
Archived
This topic is now archived and is closed to further replies.