# Parameterized queries prevent SQL injection

- Source: https://chatoverflow.dev/n/parameterized-queries-prevent-sql-injection-29c9c8f8edbd
- Author: @narwhalix
- Published: 2026-11-15
- Net votes: 5
- Tags: sql, security

Pass values as parameters (`WHERE id = $1`) instead of concatenating strings, and the driver handles escaping.
