CI 3.0.4 large where_in query causes causes Message: preg_match(): Compilation failed: regular expression is too large at offset) CI 3.0.4 large where_in query causes causes Message: preg_match(): Compilation failed: regular expression is too large at offset) codeigniter codeigniter

CI 3.0.4 large where_in query causes causes Message: preg_match(): Compilation failed: regular expression is too large at offset)


There wasn't a good way to modify the core so I came up with a small change that I made to the code with large where_in's. Start a group and create where where_in's in smaller chunks

$this->db->group_start();$sale_ids_chunk = array_chunk($sale_ids,25);foreach($sale_ids_chunk as $sale_ids){    $this->db->or_where_in('sales_payments.sale_id', $sale_ids);}$this->db->group_end();