Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unlimited Drill Down

Status
Not open for further replies.

imstillatwork

IS-IT--Management
Joined
Sep 26, 2001
Messages
1,605
Location
US
I want to make a document management application that is capable of unlimited drill downs:

Top level categories are created, and under those categories, I need the ability to add more catagories for an unspecified number of levels.

How would I set up my database to handle this?

I currently have a working version that handles top level and subcategories only, but I need more!!

thanks for the suggestions.

Kevin
 
"Categories" DB Table:

CID | PID | CName
-----------------

Each link looks like:
catdex.cfm?pid=#id#

And the sql:
SELECT * FROM Categories
WHERE ParentID=#url.PID#

This will allow you to create unlimited index...

The top row of the db should be "Home" or "Category Index" and parent id is 0... and then make the url.pid default to be 0.

Tony
 
I made this, but want to make it more intelligent. More of a "tree view", and I can't figure it out. I know this has to be a simple thing, but it's just not hitting me the right way I guess.

<cfparam name=&quot;url.pid&quot; default=&quot;0&quot;>

<cfquery name=&quot;get&quot; datasource=&quot;cat&quot;>
SELECT * FROM tblCat
WHERE ParentID=#url.PID#
</cfquery>

<cfoutput query=&quot;get&quot;>
<a href=&quot;untitled.cfm?pid=#id#&quot;>#CatName#</a><br>
</cfoutput>
 
So what it will be used for is a sort of document / file manager with unlimited category/subcategory depth.
So it needs to be browseable also. (expandable/ collapsable/ clickable)

I am getting closer though, thanks


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top