That seems wrong, so the problem is in creating the correct search query based on the checkboxes. If you view the source code on the completed page, do the checkboxes have the correct values? Which did you check when you got that where clause returned?