Q:

MySQL if string contains ' symbol how to search in LIKE

How can I search name from database if my string contains ' symbol?
This is my query that I am trying to search, but I am unable to search like this.
SELECT  * from  distributor where name  like'%jeni'%'

How to search text if my string contains ' symbol?

A:

You should escape it (like in pretty much every situation like this)
SELECT  * from  distributor where name  like'%jeni\'%'

You can also find more here

