-
-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combining multiple OrWhere to one result in AND #51
Comments
I'm doing and wondering the same thing. |
Yes I did, sort of, |
I actually found another way to do this using the reset() function. Likeso:
Notice that I start off with one required where query, and after that use $jqonq->reset() to function as a sort of AND to then be able to insert as many OR's as needed. And if needed followed again with a reset() AND, and again some OR's. In the end my $res will hold the result of all queries. |
I am working on a filter page, and I was wondering if we could combine all filters in one category like this:
If I search for 'lorum ipsum' in title and in intro and in content, if its found in any of those 3 then its a hit for that search, but I also like to see if node: specialty is 1 or 2 or 3 (than can easily be done by using whereIN.) and then I like to search in my custom macro and if that is also true then return that item.
so a hit should have ( 'lorum ipsum' in title OR 'lorum ipsum' in intro OR 'lorum ipsum' in content) AND (1 OR 2 OR 3 IN specialty) AND macro IS true.
Is this possible?
The text was updated successfully, but these errors were encountered: