title: facebook type friend search mysql query in codeigniter
body: <p>I have created 2 tables in db. one is user_account and 2nd is user_connection.
  Sending user_id1 and user_id2 in to user_connection table to make a friend request. I want to make a friend search page so need mysql query to get result of whole records of users who is in my friend list as well as not in friend list, like facebook friend search. Please help me to do the same. </p>
  
  <p><a href="https://i.stack.imgur.com/EM8Cb.png" rel="nofollow noreferrer">user_account</a>
  <a href="https://i.stack.imgur.com/EQfjP.png" rel="nofollow noreferrer">user_connection</a></p>