Is there any way to pass a condition into UNIX_TIMESTAMP()
?
eg : UNIX_TIMESTAMP(-24hr)
<- this doesn't work
This returns all records that are newer than the current unix timestamp :
$sql = 'SELECT * FROM events WHERE event_date > UNIX_TIMESTAMP() ORDER BY event_date ASC';
But I would like to return all records that are newer than the current unix timestamp - 24hrs to allow for timezone differences.
Can it be done with the UNIX_TIMESTAMP()
function alone?