sql 查询时间戳.txt DATE_SUB(CURDATE(), INTERVAL 7 DAY) = date(c.shsj_time)select * from 表名 where `createdate` = DATE_SUB(CURDATE(),INTERVAL + '1' DAY) order by createdate desc limit 0,5//5-8号的数据 createdate 属性 CURRENT_TI
DATE_SUB(CURDATE(), INTERVAL 7 DAY) <= date(c.shsj_time) select * from 表名 where `createdate` <= DATE_SUB(CURDATE(),INTERVAL + '1' DAY) order by createdate desc limit 0,5 //5-8号的数据 createdate 属性 CURRENT_TIMESTAMP SELECT * FROM user_wallet_log WHERE user_id='20' AND TYPE=1 AND (createdate > '2017-08-05' AND createdate <= DATE_SUB('2017-08-07',INTERVAL -1 DAY))