0
In my database I have 2 fields: "data_start and data_end". From a current Datetime, I need to select all dates that are in the range that date_time >= data_start AND date_time <= data_end. I did the following query and it didn’t work. (consider date_time as if it was '2014-10-14 17:44:00') Thank you!
SELECT * FROM campanha WHERE data_inicio <= '2014-10-14 17:44:00' AND data_fim > '2014-10-14 17:44:00';
Where is the current datetime in your query?
– Krismorte
'2014-10-14 17:44:00'
– willian rodrigues andrade