As the name implies, I was wondering how to concat
two fields in where clause
in mysql
. This is an example of what I'm trying to achieve:
SELECT CONCAT_WS(' ', first_name, last_name) AS name FROM `users` WHERE name LIKE "%John Doe%"
The fact is that first_name
and last_name
are separate fields, and I want to include a PHP
application to search for a personβs full name.
Any tips?
Hurrah!
source share