Jump to content

Admin page for adding categories


palace

Recommended Posts

As you can probably tell from the question I'm relatively new to all this so apologies in advance.

 

I'm trying to put together an online catalog (similar to shopping cart but with no pricing) I have a need for categories and then sub categories. I have discovered the hierarchial database model where the catagory table will look similar to

 

| ID | CATEGORY | parentID |

 

What I'm having difficulty with is trying to visualize how to do an admin page to put data into this table?

 

Any ideas?

 

Link to comment
https://forums.phpfreaks.com/topic/41694-admin-page-for-adding-categories/
Share on other sites

for the hierarchial order the parent id for the categories wub be 0

so the first entry(category) wud be

 

insert into tblname(catgeory,parentid) values('category',0)

 

When adding a sub category for this record..u need to select the categories,take the id and assign that as the parent id for the subcategory.

 

i hope this dint sound confusin

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.