Page 1 of 1

How do I reset a column in my database every x days?

Posted: Tue Mar 11, 2014 1:12 am
by chicago123
I am a PHP beginner.

Every x days (every 7 days for example), I would like all the values in a certain column in my MySQL database to reset back to '1'. How do I do this?

Please note: My web host does NOT have the MySQL event scheduler enabled so that is not an option. Also, my web hosting plan does not allow me to do cronjobs so that is not option either. Any other ideas?

Thanks!

Re: How do I reset a column in my database every x days?

Posted: Tue Mar 11, 2014 7:20 am
by Celauran
Schedule a cron job somewhere else. Write the script that will update your DB then call it via cURL or something from somewhere that does support cron or similar.

Re: How do I reset a column in my database every x days?

Posted: Tue Mar 11, 2014 6:26 pm
by chicago123
Ok thanks, that worked!

Re: How do I reset a column in my database every x days?

Posted: Wed Apr 02, 2014 10:07 am
by Kathleen201
If your hosting provider doesn't allow setting cronjobs, there are some services, that will allow cronjob up to for free, like easycron.com.