For more information about how to add a product in PHP, please help

Source: Internet
Author: User
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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.