Check out these John
http://affy.blogspot.com/ntm/index.htm

WG

-----Original Message-----
From: John Sprenkle [mailto:[EMAIL PROTECTED]
Sent: 09 July 2003 14:19
To: CF-Talk
Subject: Creating a list with infinite groupings and indents


Say I have a table with the following records:

rec id      description          parent id
1             Test Record 1      0
2             Test Record 2      1
3             Test Record 3      1
4             Test Record 4      3
5             Test Record 5      3
6             Test Record 6      4
7             Test Record 7      4
8             Test Record 8      3

The parent id field relates a record to its parent. I want to display the
records in a list so that children records are listed indented under their
parent. There can be an infinite number of nested parents and children, so
there
could be many indents in the list. The output in this example should look
like
this:

Test Record 1
      Test Record 2
      Test Record 3
            Test Record 4
                 Test Record 6
                 Test Record 7
            Test Record 5
            Test Record 8

Could somebody give me direction on how to program this? Sample code?

Thank you.





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to