5.1.14数组混合查询报错

浏览:248 发布日期:2018/08/16 分类:求助交流 关键字: 混合查询
我现在想用数组的方式做混合查询 但是报错了
例如$searchParams['is_expire'] = 1;
$searchParams[] = ['examine_status', 'exp', Db::raw('<>3')];
$data = GoodsModel::where($searchParams)
            ->field('*')
            ->page($page)
            ->order('id desc')
            ->paginate(15);
这样执行会报错

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IN (?,?,?) LIMIT 1' at line 1

应该怎么写的 求助。
升级手册上写 不支持这种混合查询。有没有人能用数组的方式 来解决这种问题,链式的方式 是没问题的。
最佳答案
评论( 相关
后面还有条评论,点击查看>>