首页 CMS系统 DEDE 实现搜索只搜指定多栏目下的文章

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

共有两种方式,通过测试第一种比较的好用。如果只是单独的调用一个栏目那么用第二种方法比较的好。 方法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:

本文来自网络,不代表青岛站长网立场。转载请注明出处: https://www.0532zz.com/html/zhonghe/cms/20200925/10572.html
上一篇
下一篇

作者: dawei

【声明】:青岛站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

为您推荐

返回顶部