ID | meta_key | meta_value
----------------------------------
1 lastname John Carter Samules
2 lastname Gayel Carter Cleve
3 lastname leve Carter Husan
4 lastname Gyan Carter eve
I want like query which fetch meta_value
for middle name carter
.
If I understood you need something like that:
SELECT *
FROM YourTable
WHERE meta_value LIKE '% carter %'
This will work for you, because added wildcard %
before and after word carter
. This means, that no care what is before and after carter
, It will select all results where is middle name carter
More info about LIKE and WILDCARDS can be found here
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments