I want to access all data under name='vehicle' so all child's and sub child's should get in single query
I have tried this query
SELECT a.CID as MainCategoryID, b.CID as ChildCategoryID, b.parentID
FROM categories a, categories b
WHERE a.CID = b.parentID AND NAME='vehicle'