SELECT DATE_FORMAT(DATE_SUB(NOW(), INTERVAL xc DAY), '%y-%m.%d') as dayStr
FROM (
SELECT @xi:=@xi+1 as xc from
(SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5) xc1,
(SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 UNION SELECT 6) xc2,
(SELECT @xi:=-1) xc0
) xcxc
查询当前天到29天前所有日期
最新推荐文章于 2023-01-05 14:42:00 发布