A
A
Alexey2016-07-20 00:11:36
PHP
Alexey, 2016-07-20 00:11:36

How to make automatic field updates in mysql database?

Good evening!
Please tell me what should be the logic and structure for solving the problem:
The essence of the problem:
There are several tables in the database
1 - Message which contains the field userID (user id), update (update date)
2 - Users which contains the field id , type (account type ) There are 3 users in the Users
table with account type 1 (automatically update every 10 minutes), 2 (automatically update every 30 minutes): id = 0, type = 1, id = 1, type = 2, id = 2, type = 2 In the Message table
there are N records.
It is necessary to use cron to automatically update the records in the Message table for each update field with an interval taken from the type field from the Users table . If someone has done a similar task or has suggestions, please recommend or point me in the right direction, thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2016-07-20
@rostel

MySQL has a built-in task scheduler,
the only thing left is to write a storage with all the necessary logic

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question