Let’s say I have a statement such as
That will process the results of a form containing checkboxes. E.g., the user can select multiple values for flavour.
Is there a way to have multiple values for ‘meta_value’. For example, for the statement to return true if the meta_value is either ‘French’, ‘German’ or ‘Spanish’.
I was thinking of trying to get around it by creating the parameter string with a for loop, but I dont think that would work as all of the parameters would need to evaluate to true for the query to return anything back.
Maybe I would just have to query every flavour and the simply remove those that I don’t need later on in the loop?
- The topic ‘Having an 'OR' statement in query_posts()’ is closed to new replies.