number of categories? (theory)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
ddragas
Forum Contributor
Posts: 445
Joined: Sun Apr 18, 2004 4:01 pm

number of categories? (theory)

Post by ddragas »

Hi all

I'm building CMS for customer who want's to have web shop. I'm stuck with categories of products.

How to make possible to have unlimited number of categories? (Interested on theory)

Also need is posibility of inserting into category mixed categories and products
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

mixed categories? you mean subcategories? That's a tree heirarchy then. If only one tier is required, you can use a simple "id, parent_id" style table structure, however if multi-tier is the goal, likely a presorted tree is in order: viewtopic.php?t=42828 may be of interest
Post Reply