title: mysql query two tables, UNION and where clause
body: <p>I have two tables.</p>
  
  <p>I query like this:</p>
  
  <pre><code>SELECT * FROM (
     Select requester_name,receiver_name from poem_authors_follow_requests  as one 
  UNION 
  Select requester_name,receiver_name from poem_authors_friend_requests as two 
  ) as u 
  where (LOWER(requester_name)=LOWER('user1') or LOWER(receiver_name)=LOWER('user1'))
  </code></pre>
  
  <p>I am using UNION because i want to get distinct values for each user if a user exists in the first table and in the second.</p>
  
  <p>For example:</p>
  
  <pre><code>table1
  
  nameofuser
  peter
  
  table2
  
  nameofuser
  peter
  </code></pre>
  
  <p>if peter is on either table i should get the name one time because it exists on both tables.</p>
  
  <p>Still i get one row from first table and a second from table number two. What is wrong?</p>
  
  <p>Any help appreciated.</p>