• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

#2
Read this on CodeIgniter 3 but should be the same.

ERROR preg_match
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply

#3
(04-01-2021, 11:20 AM)InsiteFX Wrote: Read this on CodeIgniter 3 but should be the same.

ERROR preg_match

Yes this is the same, thank you InsiteFX, please excuse my Newbiness :/ moderator can delete this thread
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.