The phpmysqlupdate statement can insert numbers normally, but cannot contain letters or Chinese characters.

Source: Internet
Author: User
Php and mysql are used in combination. the operations on numbers are completely correct. The table attribute in the database is varchar, and the database is also setutf8. but the problem should not be here, not just Chinese characters, no English letter is required. if one row of the six columns is not a number, the update will not fail, but all columns will become null. the update statement is as follows: $ query & quot; updateusersetFirstname & #39; & quot ;. $ _ GET [Firstname]. & quot; & #39;, Lastname & #39; & quot ;. $ _ GET [Lastname]. insert number phpupdate

Php and mysql are used in combination. the operations on numbers are completely correct. The table attribute in the database is varchar, and set utf8 is also in the database. but the problem should not be here, not just Chinese characters, the update statement is as follows:
$ Query = "update user set Firstname = '". $ _ GET [Firstname]. "', Lastname = '". $ _ GET [Lastname]. "', Age = '". $ _ GET [Age]. "', Hometown = '". $ _ GET [Hometown]. "', Job = '". $ _ GET [Job]. "'Where id = $ _ GET [id]";
Thank you for your guidance! Thank you !!!

Code:

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.