title: How can I combine ANDs and ORs in my SQL statement
body: <p>I have this SQL statement: </p>
  
  <pre><code>SELECT * FROM `table` WHERE type = 3 OR type = 5 OR type = 4 and table.deleted = 1;
  </code></pre>
  
  <p>I've read that I can use parenthesis to accomplish this but I was wondering if then this would be valid:</p>
  
  <pre><code>SELECT * FROM `table` WHERE (type = 3 OR type = 5 OR type = 4) and table.deleted = 1;
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>SELECT * FROM `table` WHERE (type = 3 OR type = 5) OR type = 4 and table.deleted = 1;
  </code></pre>