user3907336
user3907336

Reputation: 31

when is it best to use prepared statement

I have been looking into prepared statement and how to use them but my question is when is it best to use them or use a mysqli statement. As I was read up on prepared statement someone stated that you should never use prepared statement for something like a login form as this is only a form you will use once per time you visit a website.

Is this true or is it best to use prepared statement all the time as it stops SQL injection?

Upvotes: 0

Views: 61

Answers (1)

Cristian Arteaga
Cristian Arteaga

Reputation: 550

I think that is a good practice to use prepared statements always, it prevents some security risks and has some improvements related with performance. In the next link you can read a bit about prepared statements in java. Using prepared statements, Java Oficial

Upvotes: 1

Related Questions