Daren --

...and then Daren Cotter said...
% 
% I need to display an entire downline (info about all
% members referred by another member). The query to
...
% 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
...

% 
% I know some sort of looping (possibly recursion?)

That depends on how you have your tables structures.  This is a perfect
opportunity for a binary tree, which is also easy to traverse.  How is
the data stored?


% structure is needed, but I can't figure out how to
% display the output in tables as shown above.

See if you can live with something like

   7
  10  11
  14  16  18  20
  26  28  31  34  36  38  41  44

and then go from there.  That's trivial.

If that won't work, then you can calculate the number of cells you'll
have to have running across the table as 2n+1, where n is the referral
depth, and then calculate the position based on what level and what path.


% 
% Any help would be greatly appreciated!


HTH & HAND

:-D
-- 
David T-G                      * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://www.justpickone.org/davidtg/    Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: msg87970/pgp00000.pgp
Description: PGP signature

Reply via email to