Skip to content
RED SAG Skills
easyStudy question · answer published in SQL interview questions, so no pointssecuritysql

Stopping SQL injection

This login code builds SQL by joining strings with user input. What is the correct way to prevent SQL injection?

const sql = "SELECT * FROM users WHERE email = '" + email + "'"
await db.query(sql)
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions