2 Replies Latest reply on Apr 1, 2007 7:50 PM by insuractive

    Hierarchy

    hertelt Level 1
      There are a few different examples of this on here, but nothing quite like I need to do. I have a table in my DB with an ID, name and parent fields. I need to output this info in my ui but I am having trouble grouping them.

      Query results:

      ID Name Parent
      100 Test NULL
      101 Org1 NULL
      102 Org2 101
      103 Org3 102


      I need to dynamically output this info so that the heirarchy is correct.

      Example:

      100 - Test
      101 - Org1
      --102 - Org2
      ----103 - Org3

      Any ideas on making this happen with CFQUERY or CFLOOP?