Fixed CDbCommand "Syntax error or access violation"  when inserting a si...

This is a follow up for #118. When the user inputs a single quote for instance - CDbCommand would create a 500 and throw a ```CDbCommand failed to execute the SQL statement: SQLSTATE[42000]```

This issue was the problem that lead to the sql injection finding in the first place.

This pull requests claims to fix this.