When you execute a SQL query, you have to clean your strings or users can execute malicious SQL on your website.
I usually just have a function escape_string(blah),
I would also escape comments (double dash)
--