当前位置:首页 >> 教程资讯 >> Pboot教程

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

录入编辑:微科技 | 发布时间:2023-01-04
1、数据库中有内容而页面提示 未搜索到任何数据 解决方案: 在前半部分添加一个标签 scode=* 代表搜索所有栏目内容 查看源码打印代码帮助

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

解决方案:

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

代表搜索所有栏目内容

 
1{pboot:search num=12 order=sorting scode=* field=title|content}
2{/pboot:search}
简单搜索代码示例
1<form action="{pboot:scaction}" method="get">
2关键字:<input type="text" name="keyword" >
3<button type="submit">搜索</button>
4</form>

多条件搜索代码示例

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

1<form action="{pboot:scaction}"  method="get">
2内容:<input type="text" name="content" >
3标题:<input type="text" name="title" >
4作者:<input type="text" name="author" >
5<input type="hidden" name="scode" value="2,3" >
6<button type="submit">搜索</button>
7</form>
搜索结果列表
1{pboot:search}
2<a href="search:link">search:title</a>
3{/pboot:search}

上一篇:PbootCMS导航菜单-导航菜单的使用教程
下一篇:PbootCMS分页条效果之数字条效果
热门服务和内容

手机版

  • 官方微信

    扫码进入

  • 客服微信

  • 官方微信

    扫码添加

  • 高端网站设计,顶级互联网服务 Copyright © 2025 www.vikj.cn All Rights Reserved. 辽ICP备17005629号 XML地图 微科技
    电话咨询:0411-39550725
    在线客服咨询