Answer the question
In order to leave comments, you need to log in
Query to the database at intervals. How would you implement the algorithm?
Greetings.
It is necessary to make some analogue of cron, but with the implementation in the database.
Essence: there are some records in a DB.
The time field contains one of the numbers: 1,5,10,15,20,30
The script is executed every minute. At the first minute it should select all records with time=1, at the fifth minute with time=1 and time=5, at the tenth minute 1, 5 and 10, respectively, and so on.
How to build data storage tables? How to create the most beautiful algorithm for selecting from the database with minimization of code and resources?
Implementation is needed on the algorithm is needed on PHP
Answer the question
In order to leave comments, you need to log in
corrected in the question that the implementation is needed in php, and not using mysql
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question