I need to display an entire downline (info about all members referred by another member). The query to actually get the info I need is fairly simple, but displaying it in a table is what's tripping me up.
There are two tables: Affiliates and Referrals. Affiliates keeps track of all affiliate info. Referrals keeps track of who referred who (AffID and ReferredBy fields). The output I need is something like: 7 10 11 14 16 18 20 26 28 31 34 36 38 41 44 Where 7 referred 10 and 11, 10 referred 14 and 16, 14 referred 26 and 28, etc. Each member can only refer two others. I know some sort of looping (possibly recursion?) structure is needed, but I can't figure out how to display the output in tables as shown above. Any help would be greatly appreciated! __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php