I am trying to replace escape character with a string but the query is giving me an irrelevant result
eg- char- '\' replace with 'adfc' with below query
SELECT REPLACE("abcdefgh\i","\\", "adfc" );
output - abcdefghi
Desired output - abcdefghadfci
How can i achieve this in mysql?
in your my.ini add this line:
sql-mode="NO_BACKSLASH_ESCAPES"
then restart your mysql server, and replace your query with this:
SELECT REPLACE("abcdefgh\i","\", "adfc" );
reference here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With