LOGO设计网-免费logo设计_公司标志logo设计_logo设计门户站

帝国CMS模板调用包含指定短语关键词关键字文章列表的方法!

2022-04-05 12:10     Phome     已有32人围观

  帝国CMS模板调用包含指定短语关键词关键字文章列表的方法!

  亲测,帝国CMS任意版本可以通用!属于SQL查询直接输出!

  话不多说,下面直接贴实例代码:

[e:loop={"select * from phome_ecms_news where title like '%免费资源网%' and checked=1 order by newstime desc limit 10",10,24,0}]
<a href="<?=$bqsr[titleurl]?>" target="_blank"><?=$bqr[title]?></a><br>
[/e:loop]

  下面是帝国CMS6.6以上版本可以用的SQL语句:

[e:loop={'news',10,18,0,"title like '%免费资源网%'",''}]
<a href="<?=$bqsr[titleurl]?>" target="_blank"><?=$bqr[title]?></a><br>
[/e:loop]

您可能还喜欢

<