I am trying to get a report between two date and I don't know What is the best way, I did a query but sometimes it doesn't work and I dont know where the error is.
Thank you again.
I am saving datetime in mysql field type varchar with php date('h:iA d-m-Y').
Example in mysql row date:
09:22AM 26-06-2015
08:00AM 27-06-2015
10:00PM 28-06-2015
When I use this data example $since=01-06-2015 $until=30-06-2015 this works
But if I use this data $since=01-06-2015 $until=01-07-2015 this doesn't work.
$since = $_REQUEST['since'];
$until = $_REQUEST['until'];
mysql_query("select * from paradas where DATE_FORMAT(STR_TO_DATE(SUBSTR(date, 9),'%d-%m-%Y') , '%d-%m-%Y') between '".$since."' and '".$until."' ");