WHERE datetime older than some time (eg. 15 minutes)
older would be WHERE creation_date < DATE_SUB(NOW(),INTERVAL 15 MINUTE)
There are many ways to achieve this with INTERVAL
. I will present three:
first:
WHERE creation_date < DATE_SUB( NOW(), INTERVAL 15 MINUTE )
second:
WHERE creation_date < NOW() - INTERVAL 15 MINUTE
third:
WHERE creation_date < NOW() + INTERVAL -15 MINUTE
Inspirtion