I have a list of Categories (excel csv file), with relating criterion IDs. These categories have subcategories, which again have second set of subcategories. This continues down 5 levels.
I would like to import this into a mysql table, so I can use it.
The CSV file looks like this. Additionally, every category and subcategory are separated by a /
Criterion ID Category SubCategory SecondSubCategory ThirdSubCategory FourthSubCategory FifthSubCategory
10021 /Apparel
10178 /Apparel /Apparel Accessories
10937 /Apparel /Apparel Accessories /Bags & Packs
12262 /Apparel /Apparel Accessories /Bags & Packs /Backpacks & Utility Bags
12264 /Apparel /Apparel Accessories /Bags & Packs /Briefcases
12263 /Apparel /Apparel Accessories /Bags & Packs /Handbags & Purses
12265 /Apparel /Apparel Accessories /Bags & Packs /Laptop & Computer Bags
10935 /Apparel /Apparel Accessories /Belts & Suspenders
10938 /Apparel /Apparel Accessories /Billfolds & Wallets
10936 /Apparel /Apparel Accessories /Eyewear
12260 /Apparel Apparel Accessories Eyewear Reading Glasses
12261 Apparel Apparel Accessories Eyewear Sunglasses
10939 Apparel Apparel Accessories Gloves & Mittens
10942 Apparel Apparel Accessories Hair Accessories
10941 Apparel Apparel Accessories Headwear
12266 Apparel Apparel Accessories Headwear Hats
12267 Apparel Apparel Accessories Headwear Headscarves & Bandanas
13701 Apparel Apparel Accessories Key Chains & Key Rings
13409 Apparel Apparel Accessories Parasols & Personal Sun Umbrellas
10943 Apparel Apparel Accessories Scarves & Shawls
10940 Apparel Apparel Accessories Ties
10176 Apparel Clothing
13780 Apparel Clothing Children's Clothing
11019 Apparel Clothing Children's Clothing Baby & Toddler Clothing
12292 Apparel Clothing Children's Clothing Baby & Toddler Clothing Baby & Toddler Shoes
12293 Apparel Clothing Children's Clothing Baby & Toddler Clothing Christening Gowns & Suits
12288 Apparel Clothing Children's Clothing Baby & Toddler Clothing Newborn Clothing
10924 Apparel Clothing Costumes & Costume Rental
10919 Apparel Clothing Culturally-Specific Clothing
10906 Apparel Clothing Custom Clothing
10916 Apparel Clothing Dancewear
10920 Apparel Clothing Formal Wear
I have no clue how to import this, other than manually plot this into a table, which will take forever, since this is over 3000 rows long csv file.
Im hoping there is a way to accomplish this, either by PHP or by Mysql Import of some sort.
Im picturing an import liks this: Criterion ID | Category | Parent ID