var worker = req.param('client'); // should have been req.param('worker'); I was getting a variable passed to worker and then used it in an SQL query and i was getting a null value inserted into my table. I realized that i was using worker='value' and express was not complaining, why does it do this?
Because by default there's no validation of your req.param value.
And if your parameter is not defined in your request you are just creating an undefined variable and inserting into your Sql query.
Instead you need to check if the req.param contains that value and then create your var worker value.