maria db insertion -sql injection -error
<p>I am trying to insert values into a database (MariaDB) using SQL injection.</p>

<pre><code>var insertValues = {'username': username, 'firstname': firstname, 'lastname': lastname, 'email': email,
                        'password':password, 'profileType': profileType,'userType': userType, 'gcmId': gcmId,
                        'deviceName': deviceName, 'osType': osType, 'osVersion': osVersion,'isBlocked':isBlocked,
                        'isActive':isActive, 'ofActive':ofActive};
</code></pre>

<p>The query format I used is:</p>

<pre><code>    function registerUser(insertValues,callback)
{
    model.client.query('insert into users set ?',insertValues,function(err) {
      if(!err)
            callback({"success":'1'});
        else
            console.log(err);
            callback({"success":'0'});
    });
}
module.exports.registerUser=registerUser;
</code></pre>

<p>But this gives a syntax error:</p>

<blockquote>
  <p>Maria Db Connected at : 128.199.242.240<br>
     { [Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NULL' at line 1] code: 1064 }</p>
</blockquote>