Ask a question about commodity attribute and commodity attribute value

Source: Internet
Author: User
Ask a question about commodity attributes and commodity attribute values?
Product List
goods_id cat_id ProductName Price

property sheet
attr_id cat_id Attr_name

Attribute Value table
ID attr_id goods_id Attr_value

When the form is modified


Savedata.asp
You must first delete the delete * from [property value] where goods_id=2 and attr_id=3 and insert into [attribute value] (attr_id,goods_id,attr_value) VALUES (...)

I see Ecshop is such a processing mechanism, gentlemen, what do you think? Do you have to deal with this? Why not update the [property value] set ...
------Solution--------------------
This is the simplest and quickest way to do it once and for all

Otherwise, when you add or delete attributes, you have to decide which ones are deleted. What's new? What changes have been made?
------Solution--------------------
1.delete from Tbname where goods_id=2 and attr_id=3
Yes No *

2.update from Tbname Set ...
This is also possible, the key you need to find the conditions to modify.

------Solution--------------------
If you are modifying multiple records at the same time, a single update is not as fast as inserting multiple records into one insert statement at the same time.
  • Related Article

    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.