Tag Archives: development

Insert value “0″ for primary keys with auto increment in MySQL

In order to insert value 0 in a field that is set as primary key for a MySQL table you need to execute the following query prior to any insert query: SET SQL_MODE = “NO_AUTO_VALUE_ON_ZERO”;Continue reading

Disable foreign key checks in MySQL

Disabling foreign key checks in MySQL is usefull when you are dealing with tables that use foreign keys (InnoDB engine).Continue reading