Wednesday, May 13, 2015

Incorrect integer value: '' for column 'id' at row 1

If  mysql code is ok ( example id column increment and not need to assign any value)  then try this

Edit the my.cnf (my.ini --- in windows file can be found in program file folder where mysql installed) file  and find and comment out the line:
#sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

Just remove "STRICT_TRANS_TABLES,"  and it looks like
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

Not forget to restart mysql server.
This is the final solution for fixing this error.

No comments:

Post a Comment

Total Pageviews