title: Search SQL statement
body: <p>I have a table name <code>chat_customer</code> which has customer attribute: </p>
  
  <pre><code>id, name, status, ...
  </code></pre>
  
  <p>I also have a table name <code>chat_friendRelationship</code> and <code>myId</code> and my <code>friendId</code> can be either in column1 or column2. How to search all my <code>friendId</code>?</p>
  
  <p>My query is</p>
  
  <pre><code>SELECT 
      CHAT_CUSTOMER.CUSTOMERID, CHAT_CUSTOMER.CUSTOMERNAME,
      CHAT_CUSTOMER.STATUS, CHAT_CUSTOMER.LASTLOGIN, CHAT_CUSTOMER.ISADMIN
  FROM 
      CHAT_CUSTOMER 
  LEFT JOIN 
      CHAT_FRIENDRELATIONSHIP ON CHAT_CUSTOMER.CUSTOMERID = CHAT_FRIENDRELATIONSHIP.CUSTOMERID1
                              OR CHAT_CUSTOMER.CUSTOMERID = CHAT_FRIENDRELATIONSHIP.CUSTOMERID2
  WHERE 
      CHAT_CUSTOMER.CUSTOMERID = '1';
  </code></pre>
  
  <p>But it returns some rows with my data. I want it to return my friend data.</p>
  
  <p>Those images below are my tables.</p>
  
  <p>chat_customer Table:</p>
  
  <p><a href="https://i.stack.imgur.com/9E4jA.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9E4jA.jpg" alt="chat_customer Table"></a></p>
  
  <p>chat_relationship Table:</p>
  
  <p><a href="https://i.stack.imgur.com/lxPyG.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lxPyG.jpg" alt="chat_relationship Table"></a></p>