Incorrectintegervalue: & #39; & #39; forcolumn & _ MySQL

Source: Internet
Author: User
Incorrectintegervalue: amp; #39; amp; #39; forcolumnamp; #39; idamp; #39; atrow1 bitsCN.com

Recently, when I was writing a query insert statement, I wrote insert into test values ('', $ row [contentid], '". $ tn ."');

When the result is inserted, mysql_error () is reported.

Incorrect integer value: ''For column 'id' at row 1 is generally considered correct. Later, I checked MYSQL information. It is found that if the version above 5 is a NULL value, it should be written to NULL. this problem usually occurs on mysql 5.x. The official explanation of mysql5.1 I used said: I learned that the new mysql version has a "bug" for null insertion ", to remove the enable strict SQL mode selected by default when installing mysql, if we have installed mysql, the solution is to change the configuration in mysql. ini my. find SQL-mode in ini. the default value is SQL-mode = "STRICT_TRANS_TABLES, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION" and change it to SQL-mode = "NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION ", after mysql is restarted, what should I do if it is a virtual host or a space. It would be best if you could allow the space provider to help you change it. If not, you can only change the program. Both are standardized. Replace null with null. BitsCN.com

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.