How can I remove or replace a string from a column?
eg: I want from my articles to remove the string:
<p>John say's "Hello Mary"</p>
I try with the REPLACE() function in phpmyadmin but I get an error.
The query is the below:
select `column_name` REPLACE('<p>John say's "Hello Mary"</p>', '<p>John say's "Hello Mary"</p>', '') where id=1234;
Thank you
2
Answers
The syntax for REPLACE() is like this:
Also pay attention to quotes: ‘John say’s "Hello Mary"’ – you must escape the one from
for example
The REPLACE() function is often used to correct data in a table, replacing the old string with the new one.
The following is the syntax: