Hi,
I've checked through the forums, and can't seem to find any help for what should be a simple solution. i think my problem is not being able to see the forest because of all the trees.
i have a table in my db that has 3 columns:
cat_id (primary key)
cat_title
cat_parent (foreign key, based on cat_id)
I want a query to display a heirarchical output so that it looks like this
headwear (1, "headwear", 0)
-caps (2, "caps", 1)
-beanies (3, "beanies", 1)
footwear (5, "footwear", 0)
-sneakers (6, "sneakers", 5)
--reeboks (7, "reeboks", 6)
bags (4, "bags", 0)
and so on and so on.
Is it possible to pull this information out using one SQL Query (i'm using mysql)? as far as I can tell, a message board thread would work the exact same way, so this may help others too.
Any help would be appreciated.
Ben