allow for AND or OR operator within multiselect fields
Based on work documented in previous post, I then decided to allow the user to configure whether multiple selections made within one multiselect field should be related to each other by OR or AND, for example to allow
remedy = bloodletting AND purge
as well as
remedy = bloodletting OR purge
The operator within each field works independently of the control for the existing operator between fields, so any of these queries is now doable:
(examiner = smith) OR (remedy = bloodletting OR purge)
(examiner = smith) AND (remedy = bloodletting OR purge)
(examiner = smith) OR (remedy = bloodletting AND purge)
(examiner = smith) AND (remedy = bloodletting AND purge)
I had to extend the code modifications described before, and add a pair of radio buttons to the interface of the popup window to allow the user to specify. Entailed changes to a javascript file, lib.php and libsql.php, search.php and datalist.php by the time all was done.