I am trying to search using 2 dates. If the user chooses the same date for both from and to dates I get no results.
This example only gives me results from 2016-10-18 to 2016-10-19:
where (a.date >= '2016-10-18' AND a.date <='2016-10-20')
where (a.date >= '2016-10-18' AND a.date <='2016-10-18')
try adding Hour and minute .. the date is form 00:00 and not for 23:59
where (a.date >= '2016-10-18 00:00 ' AND a.date <='2016-10-18 23:59')