title: Query SQL | Query creation in a chat
body: <p>I need help to create a query.
  I'm trying to create a chat where I want to show messages between 2 users.</p>
  <p>As I'm making the query, it looks like I just want to show the conversation unilaterally. I want to show the information to both sides.</p>
  <p>Here is the table definition:</p>
  <pre><code>Create table chat (pid int, id_user int, id_otheruser int, message varchar(45));
  insert into chat values
     (1, 1, 9, 'Test chat 1'),
     (2, 1, 9, 'Test chat 2'),
     (3, 9, 1, 'Test chat 3'),
     (4, 1, 10, 'Test chat 4');
  </code></pre>
  <p>And here is my query:</p>
  <pre><code>SELECT * FROM `chat` WHERE `id_user` = 1 and `id_otheruser` = 9;
  </code></pre>
  <p>And in a fiddle:</p>
  <blockquote>
  <p><a href="http://sqlfiddle.com/#!9/313f58/1" rel="nofollow noreferrer">http://sqlfiddle.com/#!9/313f58/1</a></p>
  </blockquote>
  <p>In the example above I want to show the conversation between ID 1 and ID 9 and I am not able to show the conversation backwards (from ID 9 to ID 1)</p>