I\'m trying to figure out how to write a MySQL query that will return the closest 3 events in terms of date.
This is my table:
EVENT_ID EVENT_NAME
I suppose this is what you'd be looking for. It's similar to everyone elses responses aswell.
SELECT EVENT_ID FROM TABLE WHERE EVENT_START_DATE > NOW() ORDER BY ABS(DATEDIFF(EVENT_START_DATE, NOW())) ASC LIMIT 3