I am trying to write a query string that will allow user specify the search date range.
My records have a column with the "date" in the following format 0000-00-00
I can specify the FROM and TO range in the search form. Both FROM and TO have month and year.
Having difficulties with the actual query
SELECT *
FROM mytable
WHERE tbl_date(MONTH) < ".$FROMmonth."
AND tbl_date(YEAR) < ".$FROMyear."
AND tbl_date(MONTH) > ".$TOmonth."
AND tbl_date(YEAR) < ".$TOyear."
Doesn't look right, does it? 😕