Skip to content

Instantly share code, notes, and snippets.

@mdulin2
Created February 23, 2022 06:23
Show Gist options
  • Save mdulin2/aceffcb0d554377edbeb20ed5f79172a to your computer and use it in GitHub Desktop.
Save mdulin2/aceffcb0d554377edbeb20ed5f79172a to your computer and use it in GitHub Desktop.
Using mysql js's 'query with parameteritized variables.
...
connection.query(
"SELECT * FROM accounts WHERE username = ? AND password = ?",
[username, password],
function (error, results, fields) {
...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment