pat09 Posted June 25, 2008 Share Posted June 25, 2008 I am a newbie in php/mySQL. I am designing a website that will display a product catalog. There are about 6 sections of products, each section has about 10 groups, and each group has about 10 to 20 products. Each group has a certain number of properties for every product in that group. (e.g weight, size, color etc.) The number/name of properties varies with each group. These properties are to be displayed in a particular order. Each section/group/product will be displayed in a particular order. The tables I have outlined for this database are: parts table id part_no description properties table id name part_properties table id part_id property_id property_value groups table id group_name groups_parts table group_id part_id My questions are: how do I display the properties in the order that is required? how do I dipslay the products/groups in the order required? What I thought of doing is adding appropriate fields these tables that will hold the position value. Is this the best way to do this? Is there a way to do this in php? Any kind of guidance would be appreciated. Link to comment https://forums.phpfreaks.com/topic/111782-database-design-issue/ Share on other sites More sharing options...
keeB Posted July 1, 2008 Share Posted July 1, 2008 Yeah. It's common when ordering matters to add a 'listIndex' or something similar column. If you remove one of them and forget to update the indices, though, it's a pain in the ass. Link to comment https://forums.phpfreaks.com/topic/111782-database-design-issue/#findComment-578719 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.