Hi.I have a table stuctured in this manner: |categories_name|categories_id|parent_id| categories_name contains the name of the category.Categories_id is a field with autoincrement attribute.Now, if parent_id field is equal to 0, it means that this record is a "main category", while, if it contains an other values it means that we must refer to the corresponding categories_id.I hope to be clear enough in the explanation.How to generate a list of all the main categories and all subcategories??I tried with a recursive function, but i get in troubles.Suggestions, readings, ideas??! Please help me!!!!Thanks a lot