例如
$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
应该怎么写的 求助。
升级手册上写 不支持这种混合查询。有没有人能用数组的方式 来解决这种问题,链式的方式 是没问题的。
最佳答案