in reply to Combining two search fields
I believe you are confusing AND and OR.
You need an algorithm that lets you easily generate correct SQL from a list of keywords and a list of subjects. It looks like you are heading in that direction.