Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Boolean Searches on Multi-Selects

Quote Reply
Boolean Searches on Multi-Selects
One of our tables has a column called Country
Type: VARCHAR(255)
Form Type: MultiSelect
Form Names: code numbers
Form Values: actual country names

Search on one of these countries returns an accurate list -- but now we are wondering how to get a meaningful multi-select result, eg:

Using the default search_results now, separate searches on 'France' and on 'Canada' return intersecting lists.

What we really need is a multi-select search on France OR Canada
France AND Canada would be very helpful.
France NOT Canada would be great.

GT: is there a way to do this in our customized template?

Last edited by:

YoYoYoYo: Feb 13, 2003, 10:24 PM
Quote Reply
Re: [YoYoYoYo] Boolean Searches on Multi-Selects In reply to
Badly explained ...

Multiselect search using LIKE on [France, Canada] returns a list of records which include France AND Canada (OR any other country), eg: it will return records which have [France, Canada], [France, Canada, Germany], but excludes [France, Germany].

Multiselect search using EXACT MATCH on [France, Canada] returns a list of records which include France AND Canada (NOT any other country), eg: it will return records which have [France, Canada], but excludes [France, Canada, Germany].

Multiselect search using NOT EQUAL on [France, Canada] returns a list of records which do not include France AND Canada (NOT any other country), eg: it will return records which have [France, Canada, Germany], [France], [Canada], but excludes [France, Canada].

We can do quite a lot with that ... but (unless we have missed something) we can't do what we would most like to do, which is a Boolean OR search over all records, eg: list records which contain either France or Canada.

Is there a way to do it?