I need to change the value in the table after a while. My current method is as follows:
- insert end time for waiting period in table
- when the user loads a page asking for the value to be changed, check if the current> = end time is
- if so, change the value and delete the end time field; if it is not, do nothing
This will be the main feature on the site, so efficiency is the key; keeping in mind, you can probably see a problem with the way I do it. The same piece of code will be called every time someone accesses a page that needs information.
Any suggestions for improvement or better methods are welcome, preferably in php or perl.
In response to the answers to cron's work: Thank you, and I would like to do something similar if possible, but problems with the hosts are problems. Since this is the main part of the application, it cannot be limited.
source share