For questions about how to add a product in PHP, please help with the Product Table. the Pro field is ID, ProName, and Price. I want to add a product now, for example, shirt. its size is M, L, XL, XXL, color: white, red, black. Now the problem is: the M code of this product, only white and red. & Nbsp; the product's XL code, only red. & Nbsp; XXL code of this product, which has the problem of adding a product in the white or red PHP format. please help me
Product Table, Pro
Field: ID, ProName, Price
I want to add a product now, for example:
Shirt, which has the following dimensions: M, L, XL, XXL, color: white, red, black.
Now the problem is: the M code of this product, only white and red.
The product's XL code is only red.
The XXL code of this item, which is white, red, and black.
What should I do. How to add it.
And these are not fixed, such as the second item, its XL code, is not as red as the first item, there may be other colors.
How can I do these things? please help me.
------ Solution --------------------
Discussion
Reference:
I think we should create several tables: Product Table, size table, color table, product and color table, and product and size table, which will be more flexible.
I created a size chart and a color table, which respectively filled in all sizes and colors,
When adding the first item, for example, there are four sizes, M, L, XL, XXL, and three colors. how to add them?