Recursive function for category and sub-category
I need help regarding recursive function We have a category table contains category_id,category_name and parent_id: category_id category_name parent_id ------------+--------------+---------- 1 Agriculture 0 2 Appearl & Fashion 0 3 Chemicalas 0 4 Plastic & Plastic Products 0 5 Automobile 0 14 Coconut Shell Products 1 15 Nuts & Kernels 1 16 Plant & Animal Oil 1 17 Potpourri 1 18 Raw Cotton & Cotton Waste 1 19 Rice 1 20 Tea 1 21 Seeds 1 22 Vegetable 1 23 White Rice 19 24 Green Rice 19 25 Basmati Rice 19 26 Boiled Rice 19 27 Fresh Preserved Vegetables 22 28 Frozen & Dried Vegetables 22 29 Others