title: Chat communication
body: <p>I've an question about my chat application. If you communicate as user with an admin, you can see the communication from both sides, how can i call that from the DB.</p>
  
  <p>DB,</p>
  
  <pre><code>record 1: user_from, user_to, message
  record 2: user_to, user_from, message
  </code></pre>
  
  <p>sql:</p>
  
  <pre><code>SELECT * FROM messages WHERE user_from = 1 AND user_to = 2
  </code></pre>
  
  <p>But with this query i can get only one way. I can see now only the records where <code>user_from</code> 1 and <code>user_to</code> 2 is, but i also want to see where <code>user_from</code> 2 and <code>user_to</code> 1 is.</p>
  
  <p>Can someone help me with this issue?</p>
  
  <p>Thanks a lot!</p>