答案 0 :(得分:0)
我猜你正在存储UNIX TIME
。
从当前日期向后获取第5天的记录:
SELECT
*
FROM your_table
WHERE `timestamp` >= UNIX_TIMESTAMP(CURDATE() - INTERVAL 5 DAY)
AND `timestamp` < UNIX_TIMESTAMP(CURDATE() - INTERVAL 4 DAY)
答案 1 :(得分:0)
像这样使用,
SELECT * FROM table_name WHERE DATE(timestamp) = '2016-06-08'