致胜快三计划_数据库查询exp问题

浏览:73 发布日期:2019/09/12 分类:求助交流
public function search() {
$rec = input();
$model = model('Category');
$row = $model->get($rec['pid']);
$color = 'color';
$pro = model('product');
$pids = $model->field('id')->where('pid', $rec['pid'])->buildSql();
$where[$color] = ['like', '%' . $rec['color'] . '%'];
if ($rec['pid'] > 0) {
$where['category_id'] = array('exp', ' IN ' . $pids);
}
$row2 = $pro->where($where)->select();
$this->view->assign('row', $row);
$this->view->assign('row2', $row2);
return $this->view->fetch();
}

$where['category_id'] = array('exp', ' IN ' . $pids); 这句报错,要怎么写呢?
最佳答案
评论( 相关
后面还有条评论,点击查看>>