加入收藏 | 设为首页 | 会员中心 | 我要投稿 安卓应用网 (https://www.0791zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > CMS系统 > 正文

DEDE 实现搜索只搜指定多栏目下的文章

发布时间:2020-05-23 00:10:30 所属栏目:CMS系统 来源:互联网
导读:共有两种方式,通过测试第一种比较的好用。如果只是单独的调用一个栏目那么用第二种方法比较的好。 方法1: //统计列表里的记录 $cquery = Select * From `archives` arc where arc.typeid not in (1,2,3...) and {$this-AddSql}; //搜索 $query = Selec

共有两种方式,通过测试第一种比较的好用。如果只是单独的调用一个栏目那么用第二种方法比较的好。
方法1:
//统计列表里的记录

$cquery = "Select * From `archives` arc where arc.typeid not in (1,2,3...) and {$this->AddSql}";

//搜索
$query = "Select arc.*,act.typedir,act.typename,act.isdefault,act.defaultname,act.namerule,
act.namerule2,act.ispart,act.moresite,act.siteurl,act.sitepath
from `archives` arc left join `arctype` act on arc.typeid=act.id
whereact.id not in (4,5,6....) and {$this->AddSql} $ordersql limit $limitstart,$row";
把sql语句换成我这两句,括号里面的是你不搜索栏目的id

方法2:

(编辑:安卓应用网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读