Skip to content

Instantly share code, notes, and snippets.

@wmantly
Created February 12, 2014 17:55
Embed
What would you like to do?
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