ok this is kind of complicated to explain. I have two tables... Categorys and Products. This is the way the tables are setup in the database...
Categorys
Category_ID | Category_Name | Category_Parent_Category
------------------------------------------------------
1 | Root | 1
2 | DVD's | 1
3 | VHS | 1
4 | Comedy | 2
5 | Action | 2
6 | New Release | 4
7 | Old Releases | 4
8 | New Release | 5
9 | Old Releases | 5
Products
Product_ID | Product_Category_ID | Product_Name
-----------------------------------------------
1 | 6 | Big Momma's House
2 | 7 | Bowfinger
So this is the way the direcotry would be laid out..
Root
DVD's
Comedy
New Release
Big Momma's House
Old Releases
Bowfinger
Action
New Release
Old Releases
VHS
Now what I need is a way to Search all the categorys to see if it has any products listed in it and return either true or false. So it would start at the Root Category's and then check if it has any products in it, if it does not, it looks for any categorys then checks those categorys if they have any products, if it doesnt it sees if it has any sub categorys and keeps going like that.
Hopefully I made since and someone can help me. Let me know if you dont understand
Brad