When a user tries to search for people on our system, we’ve noticed that they often type a full name for their search.
How can we enable full name searching on our database when first name and last name are stored in different columns?
When a user tries to search for people on our system, we’ve noticed that
Share
A working but neither fast nor reliable solution would be:
(Not sure about MySQL CONCAT syntax atm, you might need to concat twice)
There is a high chance that this won’t use any indexes, slowing down the search a lot.
A better solution would be to just split the name:
Even better:
Provide two input boxes and label them first and lastname so users will enter the search correctly.