Added backticks to custom field name used to build query

If a custom field's name uses certain characters, such as a -, then an SQL error is generated. By wrapping the custom field name with backticks `like-so` the error is avoided.