PassMark Logo
Home » Forum

Announcement

Collapse
No announcement yet.

Multi-select AND rather than OR

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multi-select AND rather than OR

    Hi,

    I hope you can help, I am using Zoom 6 CGI, and have set up a meta field as a multi select.

    The resulting querystring:

    ?zoom_sort=0&zoom_xml=0&zoom_query=hello&zoom_per_ page=10&zoom_and=1&zoom_cat[]=1&resources[]=5&resources[]=0

    Gives me any pages with a resource meta field of either 5 OR 0, I need to show pages that have both 5 AND 0.

    The website has lesson plans that can be in a number of resource categories, so I have multiple meta fields with the same name (resources).

    I then need to show a count of how many lesson plans exist in each resource category, so they can narrow down their results by adding more and more resource categories.

    Here is my previous, non-zoom example:
    http://re.testweb.co.uk/lessonplans/

    This shows the counts next to the links to add a category to the search, and does database field matching only.

    Is there a way to replicate the filter, so I can let the user narrow down their results based on the categories?

    Thanks,

  • #2
    If you select 2 or more items in a multi-select list then you get both the items in the list. (boolean OR).

    So if the list was pick a colour,
    Red
    Green
    Blue
    Purple
    Pink

    and you selected both Green and Blue, then you both all the Green items and all the Blue items in the results. You don't just get items that are simultaneously both green and blue.

    If you want and AND function, then you need to create multiple multi-select lists, and then a boolean AND will be performed between the lists.

    Comment

    Working...
    X