ahhh, you just want to know how to create a tree structure from a flat
table?  I have never found an easy way to do it--I've seen a lot of
complicated SQL ways to do it but never liked any of them.  I generally
resort to copying the data to structures and manipulating with cfml.
I've never had to create an entire tree in a production app, only
produce breadcrumbs, which is much simpler.

This code should do what you're asking, or at least get you started in
the right direction:

http://sam.blinex.com/tst/dumpTree.cfm
http://sam.blinex.com/tst/dumpTree.cfm.txt

BTW, the sorting isn't required in order to create a proper tree, it's
only for display.

If someone has a faster method, I'm all ears.

HTH,

Sam



> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Scott Barnes
> Sent: Sunday, April 06, 2003 8:47 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [CFCDev] Category Tree based on Array/Structs Only?
> 
> 
> Sorry should clarify,
> 
> The purpose of this exercise is to simply provide the end 
> user with the abilities to see a branched tree structure 
> without having to do queries within loops.
> 
> Scott.
> 


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

Reply via email to