Perhaps rather than adding a "Subsubcategory," you could define as such:

Parent Cat:  Cat ID=1   Parent ID = Null (Top Level Cat)
SubCat:  Cat ID=2       Parent ID = 1 (SubCat of Cat 1)
Subsubcat:   Cat ID=3   Parent ID = 2 (Sub Cat of Cat ID=2)

This would save you a column in your DB and cut down on your query size.
To populate a page with the appropriate SubCat's, write your query to
find subcats where ParentID=#CatID#.  If I understand your goals
correctly, I think that this would be easier/faster.

T.


----------------------------------------------------------------------

Date: Mon, 28 Jan 2002 10:43:23 -0500
From: Robert Everland <[EMAIL PROTECTED]>
Subject: RE: doing a content mangement system, very simple need some
ideas
Message-ID: <4F77505EC4848B4E9F178300F503A6491D07@EXCH2>

Also what about adding a field called level. This would be used to
display the query in a format of 

Category
   subcategory
        subsubcategory

Level would be a number like 0,1,2,3 then we would have a cfloop where
it would do something like level*1 to get the spacing.

Robert Everland III
Dixon Ticonderoga
Web Developer Extraordinaire


Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to