• 欢迎访问晓墨博客,晓墨博客专注于电脑技术知识及资源分享! QQ群

帝国CMS灵动标签调用相关文章

CMS系统 墨墨 2年前 (2020-01-10) 272次浏览 0个评论 扫描二维码

标题包含关键字
①、比较粗糙的匹配,可能不太精确:title like ‘%$navinfor[keyboard]%’
②、精确的匹配,比较消耗资源:title regexp ‘(^|,)$navinfor[keyboard]($|,)’

关键字相同
①、比较粗糙的匹配,可能不太精确:keyboard like ‘%$navinfor[keyboard]%’
②、精确的匹配,比较消耗资源:keyboard regexp ‘(^|,)$navinfor[keyboard]($|,)’

格式1、
①、模糊匹配

[e:loop={“select * from phome_ecms_gougou where title like ‘%$navinfor[keyboard]%’ or keyboard like ‘%$navinfor[keyboard]%’ order by id desc limit 2”,0,24,1}]

[e:loop={“select * from phome_ecms_news where title like ‘%$navinfor[keyboard]%’ or keyboard like ‘%$navinfor[keyboard]%’ order by id desc limit 10”,0,24,0}]

[/e:loop]

②、精确的匹配
[e:loop={“select * from phome_ecms_news where title regexp ‘(^|,)$navinfor[keyboard]($|,)’ or keyboard regexp ‘(^|,)$navinfor[keyboard]($|,)’ order by id desc limit 10″,0,24,0}]

[/e:loop]

格式2、
①、模糊匹配
[e:loop={‘news’,10,3,0,”keyboard like ‘%$navinfor[keyboard]%’ or title like ‘%$navinfor[keyboard]%'”,”}]
·
[/e:loop]

[e:loop={0,10,3,0,”keyboard like ‘%$navinfor[keyboard]%’ or title like ‘%$navinfor[keyboard]%'”,”}]

[/e:loop]

注意:在没有相关文章时,会调用最新的文章来替代空缺的位置


本站资源来自互联网收集,仅供用于学习和交流,如有侵权不妥请联系本站删除!
喜欢 (0)
[]
分享 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址