Avoiding SQL injection without parameters

I think the correct answer is:

Don’t try to do security yourself. Use whatever trusted, industry standard library there is available for what you’re trying to do, rather than trying to do it yourself. Whatever assumptions you make about security, might be incorrect. As secure as your own approach may look (and it looks shaky at best), there’s a risk you’re overlooking something and do you really want to take that chance when it comes to security?

Use parameters.

Leave a Comment