Fixed possible SQL injection

http://stackoverflow.com/questions/9144414/function-to-sanitize-input-to-mysql-database