Hey i have a problem trying to make a query to show any new fields added in the last 24 hours. The date and time is held in the database as a time stamp in the format yyyy-mm-dd 00:00:00.
I currently have this but it is not working properly
[php]$yday = mktime(0, 0, 0, date(“m”) , date(“d”)-1, date(“Y”));
echo $yday;
$query = “SELECT *
FROM onloan
WHERE (time > $yday)”; [/php]
I have tried changing the format of this date but cannot get it to work.
Any help would be greatly appreciated.