Method for displaying Downline

From: Date: Sat, 30 Nov 2002 02:47:00 +0000
Subject: Method for displaying Downline
Groups: php.general 
Request: Send a blank email to php-general+get-126512@lists.php.net to get a copy of this message
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

« previous php.general (#126512) next »