Web Analytics Made Easy -
StatCounter Hierarchy Question - CodingForum

Announcement

Collapse
No announcement yet.

Hierarchy Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hierarchy Question

    Hi,

    I would like to write a script that displays my categories in a tree view. I searched the net a little and realized that the subject is more complicated than it looks. There are different approaches to hierarchy related subjects, some build classes for this and some try to conserve memory and solve the problem in a single query. I don't run a link portal with massive categories and subcategories. My project is simple. I have two tables dedicated to this:

    categories
    ID | name

    hierarchy
    catID | parentID

    Have read several documents and got more confused. I don't care how much memory it consumes so using recursive functions is fine. But I don't know how to do this and need advice here. Thanks.
Working...
X