1
I’m having a hard time designing a query Mysql to search for a name, and the person can type the first and last name and accept to have another name between them. For example:
Search: 'JOSÉ NUNES' or 'NUNES JOSÉ'
Result: JOSÉ SILVA NUNES
The way I research today is basically:
SELECT * FROM pessoas WHERE nome LIKE %pesquisa%
I read something about REGEXP, but I could not use functionally and did not want to repeat several "AND WHERE nome LIKE...
" because I use PDO, so it complicates a little.
The column
nome
stores the full name?– Woss
@Andersoncarloswoss yes
– Vinícius Vilela