Making SQL queries secure against attacks