I'm trying to do a search in the database with special characters, specifically string with apostrophe.
For example, I want to search for the string: "Sandy's dog", but I just entered "sandys dog" leaving out the apostrophe. Even though "Sandy's dog" exists in the database, it doesn't seem to show it in the results.
Here's my query:
SELECT * FROM `Table` WHERE `Title` LIKE '%sandys dog%'
In SQL server, you can use REPLACE:
SELECT * FROM Table WHERE REPLACE(Title, '''', '') LIKE '%sandys dog%'
The double-apostrophe inside the string is an escape character, so it finds any apostrophes in the string and replaces them with blank strings.