Hi i've got an issue that I cannot solve. It seems like the answer would be very easy, but I just can't nail down the correct answer. I'm filtering records from an access db using odbc. here is a snippet of my code:
$query = "SELECT SUM(time_spent) FROM productivity_log WHERE username = '$ecom2[name]' AND action_date = '$today'";
Here are the three ways i tried to initialize the $today variable:
1) $today = '<script type="text/javascript">
var d = new Date()
document.write(d.getMonth() + 1)
document.write("/")
document.write(d.getDate())
document.write("/")
document.write(d.getFullYear())
</script>';
2) $today = date("Y-m-d 00:00:00");
3) $day = date ("d");
$month = date ("m");
$year = date ("y");
$today = "$month/$day/$year";
It refuses to return any records and I don't know why. PLEASE HELP!!!!!