title: get all mlm downlines of an upline (php)
body: <p>I want to get all down-lines of a father in a binary tree, each father has left and right arms, each arm has left and right arms etc..
  <a href="https://i.stack.imgur.com/0BiWb.png" rel="nofollow noreferrer">like the following image</a>.
  In my database i have a table called users, each user has a father id and position which is L or R.</p>
  
  <p>Here is my function .. but it still don't get all downlines.
  <a href="https://i.stack.imgur.com/EcWkp.png" rel="nofollow noreferrer">like the following image</a>.</p>