Trying to return a MySQL when the value is one of 2 OR and an AND <p>Ok I am having some trouble with this one, for some reason this is not working.</p> <p>I am trying to get a list of trades made by a user or to the user that are still active.</p> <pre><code>SELECT * FROM trades WHERE active = 1 and trader = 1 or tradee = 1 ORDER BY trade_date ASC </code></pre> <p>This returns non active trades because the tradee or trader equals 1. I have even tried other variations.</p> <pre><code>SELECT * FROM trades WHERE trader = 1 OR tradee = 1 AND active = 1 ORDER BY trade_date ASC </code></pre> <p>Any help would be appreciated.</p>