The best way to prevent SQL injection vulnerabilities is to use a framework that allows you to construct and parameterize queries safely. An ORM works well.
Companies Mentioned
Teo Selenius
@appsecmonkey
If I only had an hour to chop down a tree, I would spend the first 45 minutes watching YouTube videos about it