I am quite new to web developing and am a little lost as to where to start with the following
problem.
Basically i want a mysql event scheduler to run every 30 mins whereby it copies a hundred elements in one column of a table in my database to another column in the same table (so updating the later table to these new values) and then finding the least value among the hundred copied entries (integers) in the updated column. And then so i can set the value as a local variable in a php script.
How on earth would i go about this? I assume it is possible. I would greatly appreciate it if somebody could provide a general or abstract method. Cheers.
To create an event, you would just do something like this:
You’ll need to make sure the event scheduler is running as well. If it is running, you should see it’s thread if you run the
SHOW PROCESSLISTcommand. If not, you can turn it on like so:You’ll also want to set the
event_scheduler=ONsetting in your my.cnf file to make sure it runs at startup (I believe it is OFF on most systems by default)See here for more details on the MySQL event scheduler