Jump to content

Max. length of selector (when searching with OR)


chuckymendoza
 Share

Recommended Posts

Hello together,

I have the following search routine to find pages containing one or more ZIP codes.
postleitzahlen.plz is the selector and is a repeater.value

The following code works fine and finds all pages that contain the (German) ZIP codes in my test string $p_test

$p_test="40489|40822|40878|40880|40882|40883";

$selector = "template=print, title|job_body|job_body_2|job_body_3%=" . implode("|", $suche_1) . ";
$selector .= ", id=[postleitzahlen.plz=".$p_test."]";
$matches = $pages->find($selector);


My problem is,  I do not have 6 numbers in $p_test, I have a lot more. In the worst case scenario I could have around 1500 !
If I have more then 80 numbers in my $p_test I got an error message:
Error: Exception: Unknown Selector operator: '' -- was your selector value properly escaped?
 

Is there a limit in having too much selectors? 

Thanks,

Thomas

 

 

 

 

 

Quote

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...