Your understanding of escape is wrong. The data inserted into the database is escaped, so the query analyzer sees the information as intended.
Take the line "Jean-Luc" Earl Gray "Picard". Escape Result: 'Jean-Luc \'Earl Grey\' Picard'
When MySQL receives this, it understands that escaped quotes need to be taken literally, this is what escapes mean, and will store them in the database. It will not store escape characters in the database. \ Indicates to MySQL that it must follow the character following it literally.
When retrieving, data is displayed in the application without escape characters, since it is deleted when the request is parsed.
source share