maqdk
07-08-2005, 03:48 PM
Hi,
I have the following table on MSSQL server:
rowid parent_id name
1 0 cat1
2 0 cat2
3 1 subcat1
4 1 subcat2
5 3 subsubcat1
column rowid is unique for each row. parent_id relates each row with its parent row. This way, there will be unlimited sub-categories.
I want to list all categories, and its subcategories in a select box showing:
cat1
-subcat1
--subsubcat1
-subcat2
cat2
and so on... How can i do this using ASP? or, is there a better way to achieve this? having categories and unlimited levels of sub-categories?
Thanks alot.
/Ali
I have the following table on MSSQL server:
rowid parent_id name
1 0 cat1
2 0 cat2
3 1 subcat1
4 1 subcat2
5 3 subsubcat1
column rowid is unique for each row. parent_id relates each row with its parent row. This way, there will be unlimited sub-categories.
I want to list all categories, and its subcategories in a select box showing:
cat1
-subcat1
--subsubcat1
-subcat2
cat2
and so on... How can i do this using ASP? or, is there a better way to achieve this? having categories and unlimited levels of sub-categories?
Thanks alot.
/Ali