If a PHP script tries to set a string value, such as an empty string, into a MySQL integer data type or column, you will likely see this error message:
Incorrect integer value ” for column ‘name’ at row 1
In this situation, what is happening is that the script is attempting to insert or update a row with the integer entry taking on either the default value (e.g., of
NULL) or the next
But MySQL is not interpreting this action as valid due to its SQL_MODE being in
In this case, to not treat this action as an error, edit my.ini, find this line –
And set to to an empty string –
Save my.ini, restart MySQL.
Afterwards, the value of
'' (empty string) will just default to whatever:
A. Is specified as the default value of the column (set when the table was created).
If this does not help, then the script needs to be searched (in your editor of choice) for the column name, and the PHP code or the SQL statements on the found lines edited to set either a proper value, or the column name removed from those statements.