I am trying to create a MySQL query that will take the current date and compare it with the two date fields that I have in my table and return rows matching this query.
here are my columns 1- [from_date], whose type is date 2- [to_date], which is also of type Date
the query should return strings between these dates.
here is my request
mysql_query("SELECT * FROM location WHERE from_date >= DATE() AND to_date <= DATE()")
My problem is that it does not return anything. Should I switch my column type to DATETIME?
Thanks in advance.
source share