• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 584
  • Last Modified:

Coldfusion recursive categories fetching loop from Database!

When im running this script it is printing all my categories. i want when level change <UL> if tag should enable.

i know my logic is wrong looking that's why looking you help....

Please find below my query output Screen Shoot

<cfset catLevel = 0>

<ul id="menu">

<cfset getQuery = getAllCategories()>
<cfloop query="getQuery">

<cfif #getQuery.level# GT #catLevel#>
    <!--Sub-Category -->

    	<a href="http://www.link.com/">

<cfif  #getQuery.level# GT #catLevel#>
    <!--Sub-Category -->
   			 <cfset catLevel = #getQuery.level#>


Open in new window

1 Solution
erikTsomikSystem Architect, CF programmer Commented:
take a look at this example I think that is exactly what you are looking for

xeondxbAuthor Commented:
yes i was looking this thanks
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now