Welcome Guest, Not a member yet? Register   Sign In
query with very large where_not_in array
#1

Hello

I have a query with a very large where_not_in array (containing more than 4000 ids)
and the query builder return an ERROR

Code:
ERROR - 2021-04-01 14:48:51 --> Severity: Warning --> preg_match(): Compilation failed: regular expression is too large at offset 35599 /……………/common-libraries/codeigniter.versions/3.1.11/system/database/DB_query_builder.php 2418

I tried to array_chunk the big array and then make multiple call to where_not_in with smaller arrays but it returns the same ERROR. i guess the arrays are combined in the query builder because it is same field and same condition operator, and that's logic ...

so i edit the system files and arbitrarily add a trivial condition line 2417  ...

PHP Code:
if (($op $this->_get_operator($conditions[$ci])) === FALSE
    
OR strlen($op) > 3000 // my add
    OR ! preg_match('/^(\(?)(.*)('.preg_quote($op'/').')\s*(.*(?<!\)))?(\)?)$/i'$conditions[$ci], $matches))
{
    continue;


but i may not be very secure ???`
Reply


Messages In This Thread
query with very large where_not_in array - by tomasoma - 04-01-2021, 06:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB