Should we always use prepared statements?

Should we always use PDO prepared statement ?
Even in UPDATE, INSERT, and DELETE ?

Short answer - yes.

Prepared statements help to provide a layer of projection against SQL injection attacks.

1 Like

In my opinion, it’s the ideal scenario, yes.

Watch this - https://www.youtube.com/watch?v=_jKylhJtPmI

2 Likes

Right, if you’re asking if you should use PDO instead of a standard mysql_query, if at all possible, yes.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.