mixing logic types in MySQL queries

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adriann
    New Member
    • Aug 2006
    • 25

    mixing logic types in MySQL queries

    Can the "WHERE" component of a query have the equivilants of brackets to seperate AND & OR conditions.

    eg:

    WHERE
    letter_id = "1",
    AND
    letter_author = "fred",
    AND
    (authors_city = "london" OR authors_city = "new york"),
    AND
    blah.. blah..

    thanks
  • adriann
    New Member
    • Aug 2006
    • 25

    #2
    the above post was sort of invalid by virtue of the fact that I had...
    "letter_id = "1"

    This would imply that only one unique record would be retrived. Thereofre, just ignore that part of it... the rest of my example should illustrate my question a bit more clearly.

    thank oyu
    Adrian

    Comment

    Working...