我正在为此查询寻找laravel方式:
select * from `table`
where (product_id, request_id) NOT IN ((66, 10),(76,23))
也许是这样的:
$ids = =array(
['66', '10'],
['76', '23']
)
DB::table('table')->whereNotInMultiple(['product_id', 'request_id'], $ids)->get();
如何在laravel中做到这一点?
答案 0 :(得分:1)
DB::table('table')->whereNotIn('product_id', ['66','10'])
->whereNotIn('request_id', ['76', '23'])->get();