I am trying to set a query that will return the user ids of registrations that happened in the last minute (between now and the last minute).
So far I am trying this:
SELECT member_id
FROM members
WHERE registration_date
BETWEEN DATE( DATE_SUB( NOW() , INTERVAL 1 MINUTE ) ) AND DATE ( NOW() )
But I don't think it is working. It is not returning any records. Can someone point me in the right direction?
The registration column is on the form:
Y-m-d H:i:s
Please any help will be greatly appreciated.
Thank you!