All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Run a search with 2 custom fields in an OR statement

James Lukensow 11 Jul 2013 21:40 question, complete

Possible to search multiple custom fields via OR operator?

I would like to basically do the following query:

select * from where zip LIKE '90210' OR facility LIKE '3124'

This is what I currently have, though it doesnt seem like the second search is ever ran:

{exp:low_search:results search:offers_related_zip_codes="{get:zip}" OR search:offers_related_facility_number="{get:facilityNumber}"}
Title: {title}
Entry: {entry_id}
{/exp:low_search:results}

As you can tell, I'll have to use the GET params for zip and facilityNumber to make the query for the results.

Replies

  1. Low 12 Jul 2013 09:33

    That's not possible at the moment. Mostly due to the way that EE works: all set parameters are always combined with AND, not OR. See also this thread: https://getsatisfaction.com/low/topic...

  2. James Lukensow 12 Jul 2013 16:06

    Thanks!