Alright. I am stumped, and would like some fresh air to this problem.
This is a personal app I am making for our company which will allow me to select all data between the 2 dates chosen.
like 01/12/2011 to 31/12/2011.
this is the script I am currently working on.
//01/12/2012 Date/Month/Year
$st_date = date("d/m/Y", strtotime($_POST['date-from']));
$en_date = date("d/m/Y", strtotime($_POST['date-to']));
$db->query("SELECT * FROM site_data WHERE party='$prty' AND date BETWEEN '$st_date' AND '$en_date'");
Basically, the date in MYSQL is set up as 20/12/2011 in String Format. When I enter that into the search, it does not retrieve any data back.
in all means terms I want to select all data from 01/12/2011 thru 31/12/2011
When I enter in the date into the form it shows the data with proper date but mixed with 2012 Year , i have tried so many ways but I have no clue how to implement this.
Please help!!!
Thanks in advance!