So i\'ve recently completed an application for a study project. It\'s all good, and all I have left is putting the application to production.
I\'m using MySQL with Node.
Same answer (given by @Jesper) works for error
ERROR 1292 (22007): Truncated incorrect DOUBLE value: ''
i.e. my
select @@GLOBAL.sql_mode; -- and
select @@SESSION.sql_mode;
gives
STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
When I updated them to
SET SESSION sql_mode = 'NO_ENGINE_SUBSTITUTION';
SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION';
my SQL inserts executed without a glitch
This error is because of Strict SQL Mode. So Only removing STRICT_TRANS_TABLES from sql_mode is enough. for example
SET SESSION sql_mode = 'ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';