Answer the question
In order to leave comments, you need to log in
How to exclude selections of one and a row of sql?
Making a fetch from the database
SELECT * FROM table WHERE Type =:type AND DateTimeRequest < NOW() - INTERVAL 24 HOUR ORDER BY DateTimeRequest ASC LIMIT 1
UPDATE table SET DateTimeRequest = NOW() WHERE Id = $id
Answer the question
In order to leave comments, you need to log in
Bad option: use lock.
for cron: flock
for mysql: https://dev.mysql.com/doc/refman/8.0/en/lock-table...
for postgresql: https://www.postgresql.org/docs/9.1/functions- admi...
A good option: a complete rewrite with the involvement of a competent developer
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question