Hi everyone,
I am trying to get a mysql query going that outputs only the items that have a timestamp within the past twelve hours.
$sql = mysql_query("SELECT * FROM latestGreatest WHERE `latestTimeStamp` between (CURRENT_TIMESTAMP()) AND (CURRENT_TIMESTAMP() - INTERVAL 12 HOUR)") or die(mysql_error());
$total = mysql_num_rows($sql);
echo "$total";
The $total keeps outputting 0 even though two items have a timestamp within the last 12 hours.
Any suggestions?
Thanks!
SC