帝国cms模糊查询用灵动标签应该怎么写,标题包含关键字词或者关键字词相同,模糊匹配或者精准匹配,青青模板网整理了关于帝国cms灵动标签查询关键字词的调用方法,供大家参考。
标题包含关键字
①、比较粗糙的匹配,可能不太精确:title like '%$navinfor[keyboard]%'
②、精确的匹配,比较消耗资源:title regexp '(^|,)$navinfor[keyboard]($|,)'
关键字相同
①、比较粗糙的匹配,可能不太精确:keyboard like '%$navinfor[keyboard]%'
②、精确的匹配,比较消耗资源:keyboard regexp '(^|,)$navinfor[keyboard]($|,)'
格式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}] <a href="https://www.ip3q.com/jiaocheng/" target="_blank">
[/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}] <a href="https://www.ip3q.com/jiaocheng/" target="_blank">
[/e:loop]
格式2
①、模糊匹配
[e:loop={'news',10,3,0,"keyboard like '%$navinfor[keyboard]%' or title like '%$navinfor[keyboard]%'",''}]
②、精确的匹配
[e:loop={0,10,3,0,"keyboard like '%$navinfor[keyboard]%' or title like '%$navinfor[keyboard]%'",''}] <a href="https://www.ip3q.com/jiaocheng/" target="_blank">
[/e:loop]
其他关于模糊查询的方法:万能标签《帝国cms在列表页模板用万能标签模糊匹配关键字词?》
以上就是关于帝国cms常见问题中"帝国cms灵动标签模糊查询关键字词应该怎么写调用?"的全部内容,如果有遇到帝国cms常见问题其他问题的,可以在评论留言,或者加微信咨询。
暂无评论内容