select CustomFieldID from oempro_custom_fields where RelListID= and FieldName='First Name' Query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and FieldName='First Name'' at line 1