Hi, 

I have been trying to do this for weeks but i just cant figure this out. I have 
categories that have subcategories and i want to insert them into database. My table 
looks like this: cat_id, parent_id and cat_name.
Let's say i wanna insert a subcategory that is associated with its parent category.
For example

ParentCat 1 
ParentCat 1 > ItsSubCat 1 
ParentCat 1 > ItsSubCat 2
ParentCat 1 > ItsSubCat 3
ParentCat 1 > ItsSubCat 4
ParentCat 2 
ParentCat 2 > ItsSubCat 1 

and so on ... 

I don't know how to create the script that inserts any subcategory(in this case let's 
say ItsSubCat 3) in its parent category.
Please, can someone help me

thanks

Reply via email to