简体   繁体   中英

Execute SQL query on a specific date

Its related to a website that I am developing, I want to deactivate all students who are being tutored, at the end of the semester. So, the user, on the admin side should be able to set the date when the semester is going to end and on that particular date, this query is to be executed and deactivate all students in the database. How do I do this using PHP and MySQL?

您可以使用Cron Job进行基于时间的定期运行。

Or you can build your login system to be aware of an end-date to their login. That way, you do not need to worry about a cron. But if you do a cron type job, build a daily task cron job so that it is something that you can use for additional tasks that are similar

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM