How to add two pieces of data to the database

Source: Internet
Author: User
How to add two pieces of data to the database how to add two pieces of data to the data, only the value of $ parent_area, $ fparent_area area changes, and the others remain unchanged
In this way, I can add code directly. I cannot add 2 pieces of data and it will be overwritten. thanks for your advice.

$ Insert = "insert into 'goods _ region' (goods_id, city, area, end_time) values ('$ ID',' $ City', '$ parent_area ', '$ endtime') "; @ mysql_query ($ insert); $ insert =" insert into 'goods _ region' (goods_id, city, area, end_time) values ('$ ID',' $ City', '$ fparent_area', '$ endTime') "; @ mysql_query ($ insert );


Reply to discussion (solution)

It won't be overwritten. it should have failed.
Check mysql ?? Error

You should check whether your table design, such as whether the id is a primary key or unique

Otherwise, you can insert the two items.

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.