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 |
insert into test 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