SELECT
timestampdiff(HOUR, yourtimestampcolumn, now() ) as hours_since,
*
FROM
Your_table
WHERE
timestampdiff(HOUR, yourtimestampcolumn, now() ) < 24
Run Code Online (Sandbox Code Playgroud)
请参阅 https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_timestampdiff