recursion in cold fusion ( was RE: Creating a list with infinite groupings and indents )

2003-07-09 Thread Hagan, Ryan Mr (Contractor ACI)
This brings up an interesting question for me. I tend to use recursive functions frequently, and have even had to solve a problem very similar to the original question posed in this thread. My take on the solution is the following (in php): itemIDitemparentID

Re: recursion in cold fusion ( was RE: Creating a list with infinite groupings and indents )

2003-07-09 Thread Paul Hastings
First and foremost, we can't run queries inside of cfscript tags. Bummer. easy enough with a wrapper function. Second, even if the query issue were resolved (and if you've got ideas for work-arounds, I'd love to hear them), you've now got variable scope issues. A variable declared in a CFMX

Re: recursion in cold fusion ( was RE: Creating a list with infinite groupings and indents )

2003-07-09 Thread Sean A Corfield
On Wednesday, Jul 9, 2003, at 13:13 US/Pacific, Hagan, Ryan Mr (Contractor ACI) wrote: function list_categories( $parentId, $level ) { cffunction name=list_categories cfargument name=parentId type=numeric cfargument name=level type=numeric global $database, $connection;

RE: recursion in cold fusion ( was RE: Creating a list with infinite groupings and indents )

2003-07-09 Thread Barney Boisvert
Worth mentioning that you can use custom tags in a recursive manner. I have several recursive tree generators on various versions of CF that use custom tags, UDFs and CFC methods. custom tags and CFFUCTION-based UDFs (including CFCs) can have CFQUERY tags in them, although if you're making a

Re: recursion in cold fusion ( was RE: Creating a list with infinite groupings and indents )

2003-07-09 Thread Jochem van Dieten
Hagan, Ryan Mr (Contractor ACI) wrote: I personally like this solution quite a bit. I know it has performance issues, but I've never noticed any significant impact on server response, even under heavy load. I think it is an ugly workaround. SQL is a set oriented language and the best way