in reply to Prevent SQL Injection

A quick search yields lots of posts on the subject, e.g. See also the links in Re^3: Preventing SQL injection attacks: Placeholders are enough for MySQL, Postgresql and SQLite for tools and papers.
--
Andreas