How does PHP operate the database once to reduce the number of fields in a table once?

Source: Internet
Author: User
How does PHP perform operations on a database to reduce the name of a table field by ces?
Id cid name cun1 2 test La 2 2 test 1 la 3 2 test 2 la

Table name: cuns
Cid title current 2 test 3


For example, if I use PHP to delete a field with id 1 in the ces table, after deletion, the current field of the field with cid 2 in the cuns table will decrease


Reply to discussion (solution)

Trigger: execute the SQL code when deleting the trigger. how to write many of them in Baidu? the main consideration is performance.

Upstairs is a type,
Is there another way to update the cuns table at the same time?
What are your requirements?

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.