title: MySQL query using AND & OR operators
body: <p>The query below loads all conversations, however, I wanted to only load the conversation between two people.</p>
  
  <pre><code>SELECT * FROM msg 
  WHERE senderid = '{$sender}' 
  OR recid = '{$recipient}' 
  OR recid = '{$sender}' 
  OR senderid = '{$recipient}' 
  order by id asc
  </code></pre>
  
  <p>How would I use the AND &amp; OR operators together? Would the following work?</p>
  
  <pre><code>SELECT * FROM msg 
  WHERE senderid = '{$sender}' 
  AND recid = '{$recipient}' 
  OR recid = '{$sender}' 
  AND senderid = '{$recipient}' 
  order by id asc
  </code></pre>