Home >Backend Development >PHP Tutorial >How to automatically update a field in a data table at a fixed time every day
For example: limit refresh to 10 times a day, and then automatically restore to 10 at a certain time in the early morning every day; if(date('H:i:s',time())=='00:00:00' {<br>
M('count')->where(array('id'=>1,'count'=>10))->save()<br>
}
But this definitely won’t work, because it’s impossible to refresh the page at exactly midnight.
It is a time trigger similar to event in MYSQL.
Who knows how to operate in thinkphp?