title: MySql PHP tree view
body: <p>I am building a web application for an affiliate program and on the <code>users</code> table I have this structure: </p>
  
  <p><img src="https://i.stack.imgur.com/kkOf8.jpg" alt="Image showing structure"></p>
  
  <p>Based on this MySql table I want every user to be able to see his tree, so I need this query: </p>
  
  <ol>
  <li>The user to see who recruited him and who was recruited by him and I don't want the query to show other users that are recruited by the same recruited that recruited this user. 
  Basicly it should look this way: </li>
  </ol>
  
  <p><img src="https://i.stack.imgur.com/ZAzKT.jpg" alt="Image showing... something. The query maybe?"></p>