title: MySQL query that checks if two user ids are friends
body: <p>I have a table which maps friendships between two user ids. The table has two columns userid1 and userid2. 
  If userid1 adds userid2 as a friend then that will be one row.
  If userid2 adds userid1 as a friend then that will be another row added to the table
  This is similar to how Facebook needs both users to add each other as friends before a friendship is established.</p>
  
  <p>How do I query the table so I find out all the userid pairs that have added each other as friends?</p>