Changed to using Prepared Statements for SQL queries.