Six ways to protect yourself from SQL Injection
mattbearman.co.uk
mattbearman.co.uk
http://www.idontplaydarts.com/2010/07/mongodb-is-vulnerable-...
For anyone else who isn't sure what they are: prepared statements involves sending a template style query and parameters to the SQL api separately, eg:
query template: "select * from users where username = ?"
Parameter: "Matt"
The SQL api knows that one is a query and one is just a parameter so injection is impossible