Good evening,
I've been searching around about the mysql event scheduler. Info and examples found on the web are very simple (and I have to admit my mysql experience is quite poor).
I need to do a mysql event scheduler that runs every hour. The event by itself isn't the problem. The thing is, I need the event to read a value from a field in each of the rows of the table, and then sum that value to another field of the row. Notice that this has to be done in all of the rows of the table, in a dinamic way, since the database keeps growing and I don't know how many rows I've got.
In PHP this would easy be to do with some for loops, a few arrays, then some UPDATE to mysql, and we would be done. The problem is that mysql event scheduler only works with mysql syntax, so this makes things a bit dificult.
I've got a table called users, it has some fields: id, name, economicalincome, credits, etc...
So.. For each id, the event should some the value from the economicalincome to the existent credits.
Thanks in advance.