I have been googling around to find the syntax used when combining logical operators in mysql but to no avail. I have found previews for books, had google tell me numerous times that there is no need to use 'AND' in searches (The search term I used was 'MYSQL combine AND and OR') and have followed numerous links to nowhere.
The good links I have found only deal with single operators or multiples of the same operator.
Can anyone suggest any good reading on the subject.
I have tried the obvious
Thinking the brackets would group the parts together.
I need always to match f1='A' and any one or more of the others.
Keith
The good links I have found only deal with single operators or multiples of the same operator.
Can anyone suggest any good reading on the subject.
I have tried the obvious
Code:
SELECT * FROM TABLE WHERE (F1='A') AND (F2='B' OR F3='B' OR F4='C')
I need always to match f1='A' and any one or more of the others.
Keith