Hi Thank you for reading my post. I have a Category table which contains all categories and there is field for each record to show the parent of that categories.
some categories has no parent so they are roo categories which has -1 as thier parentCategoryID. now i should extract each category and its childs. here is my way: -select all records which has parentCategoryID=-1 -in a loop which its length is equal to above resultset execute a query and select all records with parentCategoryID equal to current categoryID. Is it a good way, is there some better way to extract categories and sub categories? Thanks
