Resetting a MySQL Field value without user execution

后端 未结 4 671
庸人自扰
庸人自扰 2021-01-28 14:10

I need to reset a MySQL Field value automatically at midnight. It is a specific column in a specific row in a table. I know how to do this in PHP but I do not know how to execut

4条回答
  •  伪装坚强ぢ
    2021-01-28 14:57

    Asking how to reliably set off a script at the same time every night without cron (or a scheduled task, on Windows) is like asking how to make a dynamic website without a server-side language.

    If your app absolutely relies on a script running exactly at midnight, cron is a requirement. If your users have a hosting company that (stupidly) does not permit cron, they're going to be out of luck.

提交回复
热议问题