Zelengora, Bosnia and Herzegovina

Error: SQLSTATE[HY000]: General error: 1364 Field ‘xyz’ doesn’t have a default value

By default, MySQL is enabled with strict_mode ON, which will most likely cause problems with older PHP applications written for MySQL 4.   For example, strict mode will return an error on insert statements if an empty string is provided where an integer is expected.

You may disable strict mode in one of two ways:

Open your “my.ini” file within the MySQL installation directory, and look for the text “sql-mode”.

# Set the SQL mode to strict

and change to

# Set the SQL mode to strict

or you can run the following in phpMyAdmin

SET @@global.sql_mode= ”;