今天的数据
SELECT * FROM `statements` WHERE DATE_FORMAT( FROM_UNIXTIME( `happen_time` ) , ‘%Y-%m-%d‘ ) = DATE_FORMAT( NOW( ) , ‘%Y-%m-%d‘ )
昨天的数据
SELECT * FROM statements where `happen_time`>UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 1 DAY))
时间: 2024-10-10 17:19:38