How can i do a query to check if any records exist in my mysql table within 3 minutes of the currenct time?
quite easy, save a timestamp / datetime when you insert a row and then use a limitation of ... timestamp >= NOW() - INTERVAL 3 MINUTE
By adding a column for creation date, e.g.
Populate it on insertion with CURRENT_TIMESTAMP
Now, calculate the difference in minutes from the creation date until now using TIMESTAMPDIFF as follows:
WHERE timestampdiff(MINUTE, creation_date, now())<3