Reputation: 14414
I am having trouble matching strings in MySQL. I have the following:
SELECT ea.*
FROM epf_application ea
JOIN epf_application_device_type ead ON ea.application_id = ead.application_id
JOIN epf_device_type edt ON ead.device_type_id = edt.device_type_id
WHERE
edt.name = 'someDevice'
LIMIT 30
I would like to filter the above results even further by adding ea.title='%tele%'
to the above sql statement like the following
SELECT ea.*
FROM epf_application ea
JOIN epf_application_device_type ead ON ea.application_id = ead.application_id
JOIN epf_device_type edt ON ead.device_type_id = edt.device_type_id
WHERE
edt.name = 'someDevice' AND ea.title='%tele%'
LIMIT 30
The above sql statement doesn't return anything, however when I do the following I get a result.
SELECT ea.*
FROM epf_application ea
JOIN epf_application_device_type ead ON ea.application_id = ead.application_id
JOIN epf_device_type edt ON ead.device_type_id = edt.device_type_id
WHERE
edt.name = 'someDevice' AND ea.title='television'
LIMIT 30
Any suggestions on what I might be doing wrong?
Upvotes: 1
Views: 75