title: MYSQL query using OR and AND on same sentence
body: <p>I need help writing a query that will validate a first expression and than, if its true, will validate the following expression. Something like:</p>
  
  <pre><code>SELECT 
    name 
  FROM 
    names 
  WHERE 
    (tag_id = 1 OR tag_id = 2) AND (tag_id = 3 OR tag_id = 4)
  </code></pre>
  
  <p>Tried to use subqueries with if's and exists, but no success.</p>
  
  <p>Any help? Thanks,</p>