I have 2 date-ranges who will be active if existing if active.
start_date < NOW() AND end_date > NOW()
However, I want to get the first date who fulfills the condition.
This is my sql statement
SELECT
start_date,
end_date,
FROM
test
WHERE
start_date < NOW()
AND
end_date > NOW()
But it gives me 2 date - ranges.
[1] 2013-03-10 00:00:00 - 2016-01-10 00:00:00
[2] 2012-03-10 00:00:00 - 2016-01-10 00:00:00
I only want to get the first occurenct which is [2] the one who started on 2012.
Any help about this?