Hi all,
I've been fiddling around and and come up with a solution for the current date
but when i try and display the results for the previous 5 days i am running into a slight
problem. This is what i have so far:
if ($_GET['sortby'] == 'today'){
$current_date = date("Y-m-d");
$sql = "SELECT * FROM orders WHERE order_date > '$current_date 00:00:00'";
} else if ($_GET['sortby'] == 'last_5'){
$current_date = mktime(date("Y-m-d"));
$new_current_date = mktime('$current_date-432000');
$sql = "SELECT * FROM orders WHERE order_date > '$new_new_current_date'";
} else {
how do i get the $new_current_date value back to the following format
eg. 2003-07-02 12:00:05
Hence, this value will be $new_new_current_date
Cheers,
chrima