How to search on the field that stores escaped strings?

I think what TheDeadMedic is trying to say, is your data in SQL should not have escapes. You will want to run queries to remove the escapes, but that can be complicated. Until that is done, you will not be able to search for “Application’s Document” and get back any results.

When escaping strings into the database, your best option is to use prepared statements. It is the most secure way to avoid breaking SQL statements with the ‘ character, and it also prevents SQL injection.

However, if you are on an older server that doesn’t support it, you will have to use an escaping function. In PHP, MySQL has the method mysql_real_escape_string($value) which will do it for you. Just wrap all your varibles in that. It’s better than nothing.