When inserting a new record with varchar or text field that is required and has no default value. This error will display for example:
error : Field 'description' doesn't have a default value
The possible reason is that sql-mode in my.ini is set to STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION.
Change the value to
sql-mode = ""
Update 2011/4/25:
Add Default value "" if possible to avoid changing mysql setting.
Subscribe to:
Post Comments (Atom)
2 comments:
I can't find a my.ini file to add this to, either on my Linux server or my local windows development machine. Any suggestions?
Try my.cnf
Post a Comment