If in doubt, ask yourself: will this piece of simple input be screened by any API down the line? Most of the time they will be, unless you manually create SQL statements from the input.
You should not run away if you use PDO. You should not avoid if you are using JDBC prepared statements with parameters. Similarly, most other APIs will also take care of this. Stored procedures are not even associated with escaped data, and using them will not magically avoid SQL injection security issues if the input is not escaped into SQL that executes this procedure.
Always the SQL-Escape data that you put in SQL statements. Never delete SQL-Escape data outside of SQL statements.
source share