The source of your problem is your MySQL version has been updated to 5.7 (or above) or otherwise is now using "SQL Strict" mode, so as the name implies, you are needing to update the way your data is set, so it fits the strict criteria.
1)
A (unwise) work around is to change your MYSQL settings on the server to TURN OFF STRICT MODE (temporarily) and then correct your data to fit the new strict mode, before turning it back on.
Typically, Strict Mode (good reading material) includes:
- Empty values should be
null
- Invalid dates MUST be
null
- All values should have a
default
setting (this is your error).
- Data longer than the column row length will now result in a failed insert rather than a cut off (Example: inserted data is 20 chrs and the column length is
VARCHAR(15)
). Therefore column lengths must be checked before insert/update.
- GROUP BY has got a lot more fiddly.
2)
You can also look up This specific MySQL Error Code and that will guide you to resolve this issue.
3)
Further, you need to properly handle the exception that this causes, in your PHP database interface class / code.
4)
You may get more information from your MySQL Error log and possibly your PHP Error Log.