本文介绍了每二十四小时自动更新mysql表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何设置一个脚本(我假设这将是一项cron作业),该脚本每24小时将mysql表中的字段重置为零.我希望它为每个用户(不仅仅是一个特定的人)重置该字段.不幸的是,我对cron工作一无所知,但也许我甚至不需要使用它们.我不确定如何解决此问题.感谢您的帮助!

I was wondering how I could set up a script (I'm assuming it would be a cron job) that would reset a field in a mysql table every twenty four hours back to zero. I would want it to reset the field for every user not just a specific person. I know nothing about cron jobs unfortunately, but maybe I don't even need to use them. I am very unsure on how to solve this issue. Thanks for the help!

推荐答案

如何使用MySql事件计划程序本身?

What about using the MySql event scheduler itself?

http://dev.mysql.com/doc/refman/5.6/en/events-overview.html

这篇关于每二十四小时自动更新mysql表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 13:57