In MySql, is there any way of getting a partial match if you use something like:
SELECT * FROM table WHERE name LIKE '%orange llp%';
And the output to be something like:
+-----------------+
| name |
+-----------------+
| Orange |
| Telecomm Orange |
| Orange SA |
| Orange LLP |
+-----------------+
So even if the query is not an exact string to get matches based on just part of it?
Hopefully, this makes sense.
EDIT: I’m using this with a nodejs & express backend so the query will be done automatically by the backend
2
Answers
I think the issue is that you do not have any `’s around your table name and column name, and you don’t order the output (no idea if this is a requirement, but it works for me so..)
If you want to select multiple values, try it like this:
Image:
I just tested this within a random database in my
phpmyadmin
and it functioned as expected.Since you updated that you are not using php se below
Your output query will look like this
Use this class php search controller for php version
You can also add other clues