$product_codes = array_slice($product_codes, 0, 1999); // in original $product_codes about 4k codes.
$wheels = Wheel::select(array('Wheel_Size'))->whereIn('Product_code', $product_codes)->lists('Wheel_Size');
答案 0 :(得分:0)
在检查完成后,在WhereIn方法中将以下代码写在vendor / laravel / framework / src / Illuminate / Database / Query / Builder.php中,以查看$ values是否为Closure的实例(行号672 in我的项目)
if(count($values)>800)
{
return $this->whereRaw($column. ' IN ('.implode(',', $values).')');
}