0
Hello, I need to get the system to email the registered person on a form as the engineer in charge. Then I need to make an SQL that looks for the email from the name. So far ok. If the person type exactly the person’s name as it is in the bank, all right. But the field is a normal input, not a Suggest, there is no verification if the entered name actually exists. So I wanted to query, if the user registers "João Silva" in the form, the SQL search found in the database the record "João Guilherme da Silva". The way it is now, if the user only type "Silva", he thinks "João Guilherme da Silva", but if you type "João Silva", he finds nothing. Can you help me, please?
SELECT user_seq, user_name, user_email, user_elogin
FROM tabela_usuarios
WHERE user_name LIKE < cfqueryparam
cfsqltype="cf_sql_varchar"
value="%#arguments.engineerName#%"
Obs, use coldfusion :)
Important you
EDITAR
this question, explaining it clearly, objectively and directly, emphasizing the difficulty found. Furthermore, provide us with a Minimum, complete and verifiable example problem, along with its attempt to resolve. What’s more, I suggest reading the Stack Overflow Survival Guide in English to better understand the functioning of the platform, avoiding further frustrations.– Solkarped
Are you sure you can’t search for the id? If you use LIKE it can bring none or more of a result. Taking into account that you need to send the email to the existing user, to whom would you send it? To everyone? Your code would have an inconsistency as it could send an email to the incorrect user.
– Jaderson