Rome hotels - Debt Consolidation - Free Myspace Layouts - Debt Consolidation - Debt Consolidation

PDA

View Full Version : Counting articles in heirarical category system..


emailarron
Sep 7th 2008, 7:17 am
This has had me stumped for a long time...

Here is the category structure :

Table name :CATEGORIES
Fields : ID,CATEGORY,TITLE

( where CATEGORY is the parent )

Here is my articles stucture:

Table name: LISTINGS
Fields, CATEGORY, (etc)

( CATEGORY has the ID of CATEGORIES table )

So your basic heirarical category system...

What I want to do is count the listings inside of the parent category... ( and the tricky part, all of it's subcategories also ... )

any tips would be great!

JAY6390
Sep 7th 2008, 7:35 am
Can you give some examples of what would be in each of the tables, and also, can you specify the data type for each field