MYSQL check if a table value is contained in a passed string

Adam Taoufiq :

So basically im stuck in this problem. Let's say my string is this "IIS Blaise Pascal" and inside my table in mysql I have a field that contains "Blaise Pascal" how can i return that field with a query?

I have tried with LIKE %string% but it doesn't work

Nae :

I think you want:

SELECT *
FROM table t
WHERE "IIS Blaise Pascal" LIKE CONCAT('%', t.field, '%')
;

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=31841&siteId=1