Hey guys. I am getting some weird results from using BETWEEN in my sql query, and I am wondering if anyone can help me figure out why I am getting the results I get.
I'm looking for a date range in dd / mm / yyyy format. Therefore, I want to select all entries within a specific date range.
$dbSearchRecords_result = "SELECT * FROM $tbl_name WHERE Date BETWEEN '$DateFrom_order' AND '$DateTo_order'"; $dbSearchRecords_result = mysql_query($dbSearchRecords_result);
Then I call the results in the while statement from the array
while ($row = mysql_fetch_array($dbSearchRecords_result)){
Now, if I search for BETWEEN 12/02/2011 02/14/2011, the date is back from 12/13/2010.
But if I search for 12/02/2011 02/13/2012, I do not get the result on 12/13/2010.
Any ideas would be most appreciated.
Greetings.
source share