dmacburry Posted February 4, 2007 Share Posted February 4, 2007 I have a database which prints a bunch of products inside a table on a page. Basically, its 4 products per row, and then it prints a new row. Now, I have added a page where an admin can select to insert a horizontal rule after a certain product, which will divide the page into sections. For Example, the original page would look like this: XXXX XXXX XX Where X is an individual product. After adding a rule, it would look like this: XXXX XX ------ XXXX And the products are now split into different sections. The database product table rows are set up like this: | Product ID | Product Name | Product Description | And the product id auto increments, so it goes something like 52,53,54 as we add products. When the table is printed, it starts with the lowest product ID and continues. the horizontal rule table is set up like: | rule ID | between product IDs | What we need is to be able to split the products into the different sections by horizontal rule, but then be able to go back and add products into the different sections. My problem is, since everything is printed in order of product ID, i cannot go back and change all the product id's just to add one product in the middle somewhere. Does this make sense? It would be like this: XXXX < - section one ----- < - horizontal rule XXXX < - section two Then I add a product to section one: XXXX < - 1 X ----- < - HR XXXX < - 2 How do i design the database to accomodate for this? or what? any advice whatsoever? Link to comment https://forums.phpfreaks.com/topic/36967-organizing-products/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.