谁能帮我改下搜索指定id

浏览:270 发布日期:2017/08/26 分类:求助交流 关键字: 搜索
public function search()
{
$ks=input('ks');
$kss=urldecode(input('ks'));
if (empty($ks)) {
return $this->error('亲!你迷路了');
} else {
$forum = Db::name('forum');
$open['open'] = 1;


$map['f.title|f.keywords'] = ['like', "%{$kss}%"];

$tptc = $forum->alias('f')->join('forumcate c', 'c.id=f.tid')->join('user m', 'm.id=f.uid')->field('f.*,c.id as cid,m.id as userid,m.userhead,m.username,c.name')->order('f.id desc')->where($open)->where($map)->paginate(15,false,$config = ['query'=>array('ks'=>$ks)]);
$this->assign('tptc', $tptc);
return view();
}
}
现在搜索是整个站点的搜索!有没有办法 指定id
比如我的id1是文明id2是和谐
我要指定搜索id2
哪个高手能弄?!
帮我改下搜索指定id
最佳答案
评论( 相关
后面还有条评论,点击查看>>