How-To-Fix You have many solutions to fix this awful error:
Add the IGNORE parameter to your INSERT or UPDATE queries to consider this error just a warning.
Code:
/* change this */
INSERT INTO smth ...therestofthequery...;/* to */
INSERT IGNORE INTO smth ...therestofthequery...;
You should replace the empty string fields '' as NULL for the relative enum/set ones. It could be boring, and db could not read such NULL fields at all causing a crash. NB: You should also set the field NULLable.
Remove the STRICT_TRANS_TABLES flag from the sql_mode variable putting this at the beginning of the query:
Code:
SET sql_mode=(SELECT REPLACE(@@sql_mode,'STRICT_TRANS_TABLES',''));
How-To-FixYou have many solutions to fix this awful error:Add the IGNORE parameter to your INSERT or UPDATE queries to consider this error just a warning.Code:/* change this */INSERT