There's a good article at defusion.com on how to do this, called
"Recursion 101"
(http://www.defusion.com/articles/index.cfm?ArticleID=63). I used this
in categorizing books in my Amazon bookstore (see
http://www.astutia.com/books/index.cfm for an example), although my
categories only run to two levels.  You should still be able to
implement this to meet your needs.

Chris Montgomery             [EMAIL PROTECTED]

Web Development & Consulting http://www.astutia.com
Allaire Consulting Partner & NetObjects Reseller
210-490-3249/888-745-7603    Fax 210-490-4692

>-----Original Message-----
>From: Anuj Gakhar [mailto:[EMAIL PROTECTED]]
>Sent: Monday, October 30, 2000 12:02 AM
>To: CF-Talk
>Subject: tree structure
>
>
>I have got a databse table like this:
>
>catid   category   parent
>
>1 auto   0
>2 autos1  1
>3 autos2  2
>4  autos3  3
>5  autos4  0
>6 autos5  0
>7  autos6  5
>
>and so on .....i can add and delete categories from the table
>from another
>template i have made...
>
>what i want is to make a tree structure of all the categories like this
>
>-->auto
>  -->autos1
>     -->autos2
>      -->autos3
>-->autos4
>-->autos5
>   -->autos6
>
>this tree structure should come dynamically and any no. of
>categories i add
>should be displayed here.
>i tried to do this but i got mixed up with cfloop and cfoutput
>and i dont
>have that much time to work on it....
>can anybody please help me out of this.....
>P.S There can be any no. of categories under another category ..so dont
>think that there is only one subcategory under another category.
>
>I hope i get a solution for this here
>thanks in advance...
>
>
>
>_________________________________________________________
>Do You Yahoo!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>---------------------------------------------------------------
>---------------------------------
>Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>Unsubscribe:
http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]

------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to