1、数据库中有内容而页面提示 未搜索到任何数据

解决方案:

在前半部分添加一个标签 scode=* 

代表搜索所有栏目内容
 

{pboot:search num=12 order=sorting scode=* field='title|content'}
{/pboot:search}

PbootCMS搜索未搜索到任何数据,Pb多条件搜索

简单搜索代码示例

<form action="{pboot:scaction}" method="get">
    关键字:<input type="text" name="keyword" >
    <button type="submit">搜索</button>
</form>

多条件搜索代码示例

可以通过隐藏字段,指定搜索的栏目

<form action="{pboot:scaction}"  method="get">
    内容:<input type="text" name="content" >
    标题:<input type="text" name="title" >
    作者:<input type="text" name="author" >
    <input type="hidden" name="scode" value="2,3" >
    <button type="submit">搜索</button>
</form>


搜索结果列表

{pboot:search}
<a href="search:link">search:title</a>
{/pboot:search}



特别说明:本站资源来自网友发布分享,仅供学习与参考,请勿用于商业用途,若有侵权请联系删除(272966172@qq.com)。

声明:本资料由淘建站会员提供,如转载注明来源,资料来源淘建站免费素材库:https://www.taojz.cn/topic/1060.html
PbootCMS搜索未搜索到任何数据,Pb多条件搜索 希望对你有帮助,感谢您的支持!
留言(0)
头像
 阿里云限量代金券,戳我领取
1 2