I need a functional php code that would count all referrals infinitely. In my website, each user is referred by an "upline" during registration. These data are in mysql database.
*P.S My website is MLM (multilevel Marketing) by the way.
PLEASE look at the attached picture example and the following is seen: A is referrer of B & C; B is referrer of D & E; C is referrer of F & G; while G referred only H at the moment.
"A" has total of 7 referrals already (3 from left and 4 from right). assuming, this referral process continues deep down the genealogy infinitely, i want the count to go deep down the hierrachy [login to view URL] picture is just an example, i will need you to do this code into my website.
My need is a php code that would count the total current number of referrals under a user from his right leg (separately) and left leg (separately) no matter the number of current downlines he has?.
In the picture example above, we can easily see that "A" has his LEFT's downline count to be '3' and RIGHT's count to be '4'. I will implement this in MLM website that has thousands of users and each user needs to know their downline counts (LEFT and RIGHT LEG). the users are stored in MYSQL database
24 frilansere byr i snitt $20/t for denne jobben
fine i can make the custom php function as per your image but need to discuss some technical logics before i estimate so let me know when you are available to discuss this in more detail ?