欢迎来到元素模板ys720.com,本站提供专业的织梦模板PBOOTCMS模板网站模板网站修改/网站仿站
当前位置:主页 > 程序教程 > 帝国cms教程 >
帝国cms教程

帝国cms 灵动标签调用全站最新 和 推荐 热门文章

(元素模板) / 2021-12-06 11:05
帝国cms  使用灵动标签推荐文章的代码
[e:loop={'select id,classid,titleurl,filename,title,newstime,titlepic from [!db.pre!]ecms_news where checked=1 and isgood=1  order by newstime desc limit 5',5,24,0}]
<li> <a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr[title]?></a> </li>
[/e:loop]

下面是对应SQL语句 ,可以替换使用

1,根据最新文章 select * from [!db.pre!]ecms_news where checked=1 order by newstime desc limit 10
2,根据推荐文章 select * from [!db.pre!]ecms_news where checked=1 and isgood=1 order by newstime desc limit 10
3,根据热门文章 select * from [!db.pre!]ecms_news where checked=1 order by onclick desc limit 10
4,根据头条新闻 select * from [!db.pre!]ecms_news where checked=1 and firsttitle=1 order by newstime desc limit 10
5,根据评论排行 select * from [!db.pre!]ecms_news where checked=1 order by plnum desc limit 10
6,根据digg排行 select * from [!db.pre!]ecms_news where checked=1 order by diggtop desc limit 10
7,根据投票排行 select * from [!db.pre!]ecms_news where checked=1 order by votenum desc limit 10
8,根据下载排行 select * from [!db.pre!]ecms_news where checked=1 order by totaldown desc limit 10
9,根据评分排行 select * from [!db.pre!]ecms_news where checked=1 order by infopfen desc limit 10 
Copyright @ 2013-2021 元素模板 www.ys720.com All Rights Reserved. 版权所有 元素模板 www.ys720.com