moneygrinch Posted March 19, 2007 Share Posted March 19, 2007 I am tying to figure out how to track downlines for an mlm model. I set the table in MYSQL to have an upline ID. So I have got the 1st level perfect. $level_1 = @mysql_query("SELECT member_id FROM call_center WHERE upline_id={$_SESSION['member_id']}"); $level_1a = mysql_fetch_array($level_1); $upc = mysql_num_rows($level_1); if($upc > 0){ $upc = $upc; }else{ $upc ="None"; } So that works perfectly! Now here is the issue. All the people that are found in the above query, I need to figure a way to do another query to find all of the people below them and so on. How do I know who is found and then take the found persons id and find the people they have recruited? Any ideas would be a great help! Link to comment https://forums.phpfreaks.com/topic/43362-mlm-tracking/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.