I need to create a query in mysql that will list the top level category and list any sub-category in it .The categories and subcategories are in same table. for eg.
id_category | id_parent | name
1 | 0 | category#1
2 | 1 | subcategory#1
3 | 1 | subcategory#2
4 | 2 | subsubcategory#1
5 | 0 | category#2
5 | 5 | subcategory#3