How to change each line of information

Source: Internet
Author: User
How do I change each line of information?
This post was last edited by b234387 on 2013-02-19 21:02:02



How do I change each line of information?


Can you teach me to change the SQL directly on the webpage or change it with PHP?


MySQL table

TabA
Order Class Quota _ quota _ Use quota _ level
1 A 5 3 2 2
2 B 5 1 4 2
3 C 5 2 3 1


The 1th situation to be: "Horizontal" =2 All "limit" change to 10, modify "left".

2nd situation to: "Horizontal" =2 All "limit" + 4, modify the "left".

The 3rd situation is: All "left" should be correct. Update each line "remaining" = "limit"-"use".


================

TabB
A B
"1" and "" "
"2", "W"


How do you copy all the "A" columns to the "B" column?









------Solution--------------------
The first one didn't read.
The second one can be written like this:
Update TabB set b=a;

  • 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.