I have a mysql db with a date column (yyyy-mm-dd) and a time column (hh:mm:ss) from which I extract data from that falls after todays date...
Code: Select all
$query="SELECT *
FROM listings
WHERE show_date > CURDATE()
ORDER BY show_date";
$result=mysql_query($query);
$num=mysql_numrows($result);I tried a workaround but even that is not ideal... and it doesnt work anyway...
Code: Select all
$query="SELECT *
FROM listings
WHERE show_date > DATE_SUB(CURDATE(), INTERVAL 1 HOUR)
ORDER BY show_date";
$result=mysql_query($query);
$num=mysql_numrows($result);I thought this might be 1 hr after midnight but it takes 1 hr after the curent time so that doesnt work either.
Any ideas...