Skip to content

Commit

Permalink
typo in sql parametizer
Browse files Browse the repository at this point in the history
  • Loading branch information
nahsra authored Aug 31, 2023
1 parent fb28cf9 commit b36cf0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/codemods/java/pixee_java_sql-parameterizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Our changes look something like this:
```diff
- Statement stmt = connection.createStatement();
- ResultSet rs = stmt.executeQuery("SELECT * FROM users WHERE name = '" + user + "'");
+ PreparedStatement stmt = connection.prepareStatement();
+ PreparedStatement stmt = connection.prepareStatement("SELECT * FROM users WHERE name = ?");
+ stmt.setString(1, user);
+ ResultSet rs = stmt.executeQuery();
```
Expand Down

0 comments on commit b36cf0e

Please sign in to comment.