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.