default | grid-3 | grid-2

Post per Page

Querying rows that are 5 minutes old or more

Querying rows that are older than 5 minutes

I recently had a couple separate tasks running on the same database and I wanted to make sure that the second task did not interefere with the other task.

To help with this I made sure that the second task waited for 5 minutes before grabbing the data.

Here is how you do that in MySQL

SELECT * FROM your_table_name WHERE datecreated <= NOW() - INTERVAL 5 MINUTE;

No comments

Error Page Image

Error Page Image

Oooops.... Could not find it!!!

The page you were looking for, could not be found. You may have typed the address incorrectly or you may have used an outdated link.

Go to Homepage