diff --git a/lib/mysql.js b/lib/mysql.js index 3c4831e..5f3cafc 100644 --- a/lib/mysql.js +++ b/lib/mysql.js @@ -269,7 +269,7 @@ function dateToMysql(val) { */ MySQL.prototype.toDatabase = function (prop, val) { if (val === null) return 'NULL'; - if (val === undefined) return; + if (val === undefined) return 'NULL'; if (val.constructor.name === 'Object') { var operator = Object.keys(val)[0] val = val[operator];