.
PbootCMS搜索未搜索到任何数据,Pb多条件搜索
2024-04-08
6
1、数据库中有内容而页面提示 未搜索到任何数据
解决方案:
在前半部分添加一个标签 scode=*
代表搜索所有栏目内容
| 1 | {pboot:search num=12 order=sorting scode=* field='title|content'} |
|
简单搜索代码示例| 1 | <form action="{pboot:scaction}" method="get"> |
| 2 | 关键字:<input type="text" name="keyword" > |
| 3 | <button type="submit">搜索</button> |
|
多条件搜索代码示例
可以通过隐藏字段,指定搜索的栏目
| 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> |
|
搜索结果列表| 2 | <a href="search:link">search:title</a> |
|
免责声明:以上内容转自其它媒体,相关信息仅为传播更多信息,与本站立场无关。做网站,做小程序,模板小程序不保证该信息(包含但不限于文字、视频、音频、数据及图表)全部或者部分内容的准确性、真实性、完整性、有效性、及时性、原创性等,如有侵权请联系4000-277-886。