Skip to content

Instantly share code, notes, and snippets.

@wmantly
Created February 12, 2014 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wmantly/8960923 to your computer and use it in GitHub Desktop.
Save wmantly/8960923 to your computer and use it in GitHub Desktop.
connection.query('INSERT INTO users (name, password) VALUES ("'+req.body.name+'", "'+hashedPassword+'")' , function(err, rows, fields) {
if (err) throw err;
res.json({actionMessage:"User <i>"+req.body.username+"</i> committed "} );
});
@aonic
Copy link

aonic commented Feb 12, 2014

connection.query('INSERT INTO users (name, password) VALUES (?, ?)", [req.body.name, hashedPassword],   function(err, rows, fields) {
    if (err) throw err;
    res.json({actionMessage:"User <i>"+req.body.username+"</i> committed "} );
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment