On Mon, 7 Mar 2005 15:53:17 -0600, Kevin Aebig <[EMAIL PROTECTED]> wrote: > This makes no sense to me as to why it's failing... If anyone can shed some > light... I'll owe them a beer.
You aren't declaring your local variables so they are being overwritten by your recursive calls... > <cffunction name="makeTree" hint="Creates HTML Tree from Query object"> > <cfargument name="dataObj" required="true"> > <cfargument name="parentID" required="true"> Add this: <cfset var getCurrentItems = 0 /> <cfset var checkForChild = 0 /> > <cfquery name="GetCurrentItems" dbtype="query"> > SELECT * FROM dataObj > WHERE parentid = #parentID# > ORDER BY submitted > </cfquery> > > <ul> > <cfloop query="GetCurrentItems"> > > <cfoutput><li>#GetCurrentItems.comment#(#GetCurrentItems.id#)</cfoutput> > > <cfquery name="CheckForChild" dbtype="query"> > SELECT * FROM dataObj WHERE parentid = > #GetCurrentItems.id# > </cfquery> > > <cfif CheckForChild.RecordCount GT 0 > > <cfset makeTree(dataObj, GetCurrentItems.id)> > </cfif> > </cfloop> > </ul> > </cffunction> -- Sean A Corfield -- http://www.corfield.org/ Team Fusebox -- http://www.fusebox.org/ Breeze Me! -- http://www.corfield.org/breezeme Got Gmail? -- I have 50, yes 50, invites to give away! "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197763 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54