Msql:incorrect Double value: ' For column ' id ' at row 1 resolved

Source: Internet
Author: User

Incorrect Double value: ' For column ' id ' at row 1 resolved

I wrote this the last time I wrote a query to insert a statement.
1 insertintotest values(‘‘,row[contentid],′".tn."‘);

And then I got killed and I mysql_error. Incorrect integer value: ' for column ' id ' at row 1 This error generally we think there should be no error. Later, I looked up the information of MySQL. Found more than 5 versions if the null value should be written to null this problem generally appears on MySQL 5.x. I used the mysql5.1 official explained: learned that the new version of MySQL to null insertion has "bug", to install MySQL when the default check to remove the Enable strict SQL mode then if we installed MySQL what to do, The workaround is to change the configuration in MySQL My.ini my.ini to find Sql-mode, which defaults to
1 sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

The revision was changed to
1 sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

After restarting MySQL, then if it is a virtual host or space to do. If you can let the space quotient help you change that is the best. If not, then you can only change the program. are regulated a little. Null to write NULL instead.

Msql:incorrect Double value: ' For column ' id ' at row 1 resolved

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.