当前位置 : 主页 > 网络编程 > PHP >

sql 查询时间戳.txt

来源:互联网 收集:自由互联 发布时间:2021-06-28
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
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_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))
网友评论