优晟SEO

您现在的位置是:首页 > CMS教程 > 帝国cms > 正文

帝国cms

帝国CMS模板使用灵动标签和万能标签附加sql语句的写法

标签   帝国   写法  
佚名 2024-08-25帝国cms
帝国cms模板制作网站使用灵动标签和万能标签附加sql语句的写法灵动标签:[e:loop={0,10,3,0,'isgood=1','newstime DESC'}]<a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr['ti……

帝国CMS模板使用灵动标签和万能标签附加sql语句的写法

帝国cms模板制作网站使用灵动标签和万能标签附加sql语句的写法

灵动标签:
[e:loop={0,10,3,0,'isgood=1','newstime DESC'}]<a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr['title']?></a> <br>[/e:loop]'

万能标签:

[ecmsinfo]0,10,32,0,3,1,0,'isgood=1','newstime DESC'[/ecmsinfo]

标签附加sql有以下几种:

1、isgood=1 一级推荐(1-9) isgood=0 排除推荐调用

2、firsttitle=1 一级头条(1-9) firsttitle=0 排除头条调用

3、field='值' 字段等于某值

4、newstime DESC 按发布时间降序排序 (最新)

5、newstime ASC 按发布时间升序排序 (最旧)

6、id DESC 按ID降序排序

7、onclick DESC 按点击降序排序

8、totaldown DESC 按下载降序排序

9、plnum DESC 按评论降序排序

10、diggtop DESC 按顶数降序排序

11、isurl=0 排除重复文章调用

12、istop=0 排除置顶调用

13、ismember=0 排除会员调用(=1时为调用会员)

14、ispic=1 只调用 标题图片的信息

帝国CMS 灵动标签排除头条、推荐、置顶等信息调用

sql调用:

select * from phome_ecms_表 where istop=0 and isgood=0 and firsttitle=0 and checked=1 order by newstime desc limit 10

解释:

istop=0 是排除置顶 信息

isgood=0 是排除推荐 信息

firsttitle=0 是排除头条 信息

灵动标签简化版写法

sql附加条件'istop=0 and isgood=0 and firsttitle=0 and checked=1'