One dive can be in multiple catagories - for example "teaching" and "deep".
If multiple types are selected than they are concatenated into a string separated by commas.
Hoever this can cause queries when searching for specific types of dive.
For example:
divetype=6=cave
divetype=26=stage
If I search for divetype = cave(6) then it *only* finds the records where divetype=6.
It doesnt find the records where cave is in the string eg "14,6"
If I change the search to be divetype contains cave(6) then it finds records where the divetype contains 6 in any position - for example 16 or 26 or 6. Which is also wrong

How do you query from the divetype containing 6 or ,6 - so that if will find only the cave dives (and all of them).
I think it needs a tweak to the conversion behind the scenes from the name of the type to the code, to ensure it includes codes regardless of which position they appear in?
Hope that makes sense.