- Impact
- 11,467
I don't really know how to ask this question. But when I talk about efficiency, I'm asking about
1) The Coding
2) The MySQL Speed
3) The Website speed.
My current software has only 1 level of categories, and it's kinda getting inefficient. So I want to add sub-categories. How is the most efficient way to do this?
My primary goal here is, in the front-end, to display the top-level categories, and then drill down to the sub-categories, or sub-sub-categories to the products, instead of displaying all the categories together, as is what is happening now.
1) Should I just add the top level categories and define them as top-level, and define and point the subcategories to them? How to do that?
2) Should I go for a numbering system. 1-99 are top level categories, 1001-1999 are subcategories of 1, etc. How to do that?
3) Some other method altogether?
For flexibility, products should be able to go to more than 1 category or subcategory. Or even a subcategory could go to more than 1 category (although in practice I'm not doing this).
I'm not going to be doing the coding for this. I'm just looking for the best method to specify to a programmer. So I would like some comment about how easy or hard this is going to be for the PHP programmer.
1) The Coding
2) The MySQL Speed
3) The Website speed.
My current software has only 1 level of categories, and it's kinda getting inefficient. So I want to add sub-categories. How is the most efficient way to do this?
My primary goal here is, in the front-end, to display the top-level categories, and then drill down to the sub-categories, or sub-sub-categories to the products, instead of displaying all the categories together, as is what is happening now.
1) Should I just add the top level categories and define them as top-level, and define and point the subcategories to them? How to do that?
2) Should I go for a numbering system. 1-99 are top level categories, 1001-1999 are subcategories of 1, etc. How to do that?
3) Some other method altogether?
For flexibility, products should be able to go to more than 1 category or subcategory. Or even a subcategory could go to more than 1 category (although in practice I'm not doing this).
I'm not going to be doing the coding for this. I'm just looking for the best method to specify to a programmer. So I would like some comment about how easy or hard this is going to be for the PHP programmer.
Last edited:





