Reputation:
Do I need mysqli_escape_string to avoid sql injection if I use mysqli prepared statement
Upvotes: 1
Views: 79
Reputation: 3206
No you don't, prepared statements will ensure that your queries are sanitized properly.
In fact, prepared statements are the safest way to prevent injections, escaping is never 100% safe.
This explains why: Why is using a mysql prepared statement more secure than using the common escape functions?
Upvotes: 1