When using mysql to insert data, the system prompts to solve the Incorrect integer value: for column id; at row 1 error. Let's take a look at the solution to this problem.
I recently wrote a query insert statement as follows:
Insert into test values (", row [contentid], '". tn ."');
After the result is inserted, mysql_error () is reported. Incorrect integer value: "for column 'id' at row 1. Generally, we think there should be no error. Later, I checked MYSQL information. It is found that versions above 5 should be NULL if they are NULL.
This problem is generally mysql 5. I used mysql5.1 on x. The official explanation said: I learned that the new mysql version has a "bug" for inserting null values. I need to remove the enable strict SQL mode selected by default when installing mysql, so what if we have installed mysql? The solution is to change the configuration in mysql. ini
Search for SQL-mode in my. ini. The default value is: SQL-mode = "STRICT_TRANS_TABLES, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION" and change it
SQL-mode = "NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION ",
After you restart mysql, what if it is a virtual host or a space. If you can let the Space Provider help you change it, it is the best, if not, then you can only change the program. Both are standardized. Replace null with null.