select DATE_FORMAT(a.Date ,'%Y%m%d') dates
from (
select curdate() - INTERVAL (a.a + (10 * b.a) + (100 * c.a)) DAY as Date
from (
select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as a
cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as b
cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as c
) a
where a.Date between '2014-01-14' and date_format(now(),'%Y-%m-%d')
from (
select curdate() - INTERVAL (a.a + (10 * b.a) + (100 * c.a)) DAY as Date
from (
select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as a
cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as b
cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as c
) a
where a.Date between '2014-01-14' and date_format(now(),'%Y-%m-%d')
'etc > old' 카테고리의 다른 글
[JS] call vs apply : 과연 뭐가 다른가. (0) | 2014.01.24 |
---|---|
[JS] underscore : 자바스크립트 문자열 유틸리티 정리 (0) | 2014.01.23 |
[MAC] 맥북 무선 인터넷 안될때 하는 조치 SMC Controller reset (0) | 2013.12.14 |
[JAVA] maven에 다른 repository 추가하는 방법 (0) | 2013.10.29 |
Sitemesh VS Tiles in Spring (0) | 2013.10.29 |