How To Turn off MySQL Strict Mode
0By 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”.
Find:
# Set the SQL mode to strict
sql-mode=”STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”
and change to
# Set the SQL mode to strict
sql-mode=”NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”
or you can run the following in phpMyAdmin
SET @@global.sql_mode= ”;
Hi I'm Nick Bartlett and thanks for visiting my blog. I'm not much of a writer; many of my posts are short and to the point while others are meant to be a reference for myself and other web developers.