帝国cms灵动标签调用指定某个时间段发布的内容
指定某个时间段的内容
1、某天发布的文章
[e:loop={'news',10,18,0,'newstime>='.to_time('2010-11-11 00:00:01').' and newstime<='.to_time('2010-11-11 23:59:59').''}]
<a href="" target="_blank">
[/e:loop]
或 (to_time 换成 to_date)
[e:loop={'news',10,18,0,'newstime>='.to_date('2016-07-31 00:00:01').' and newstime<='.to_date('2016-08-31 23:59:59').''}]
<a href="" target="_blank">
[/e:loop]
2、某一段时间发布的文章
[e:loop={'news',10,18,0,'newstime>='.to_time('2016-07-31 00:00:01').' and newstime<='.to_time('2016-08-31 23:59:59').''}]
<a href="" target="_blank">
[/e:loop]
或
[e:loop={"select * from [!db.pre!]ecms_news where newstime > UNIX_TIMESTAMP('2016-06-01') and newstime < UNIX_TIMESTAMP('2016-08-23') order by id desc limit 30",30,24,0}]
<a href="" target="_blank">
[/e:loop]
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。