ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

using multiple search: parameters together

May 17, 2011 8:10am

Subscribe [1]
  • #1 / May 17, 2011 8:10am

    johnny.slack

    4 posts

    Hello, I’m trying to use multiple search: parameters together, but as an OR not as an AND

    For instance, by default it seems as though this query searches “region” and “rating” as an AND.
    {exp:channel:entries search:region="germany|belgium" search:rating="=3|4|5"}

    Is there a way to combine search parameters together so they search as an OR?

    Thanks!

  • #2 / May 17, 2011 7:46pm

    Lisa Wess

    20502 posts

    Hi, Johnny - 2 search parameters will always be AND right now.  There are feature requests to change this; but if you need an immediate solution, then you’d need a custom plugin or PHP/MySQL to accomplish this.

  • #3 / May 18, 2011 7:00am

    johnny.slack

    4 posts

    Okay cool, understood - I’ll take a look around. I guess a plugin is also required (or plain old mySQL statement) if I want to search anything other than a custom field (such as the Title)?

    Oh, and ExpressionEngine is the most awesome thing of all things

    Thanks!

  • #4 / May 18, 2011 2:20pm

    Lisa Wess

    20502 posts

    Hi, Johnny-

    Correct, search: is only for custom fields, so if you need this on the title, you’ll need a custom add-on.

    Search Fields may be a good solution as well?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases