XF 2.2 Mysql strings to replace characters

Black Tiger

Well-known member
I need 3 mysql strings to replace things.
First one is like this:
Code:
UPDATE xf_post SET message = REPLACE(message, '>', '>');
but this gives an error in the used syntax at "> it says. While there is only one ' in the string there.

The second one is the same, but then for &lt; which needs to be replace to a < character.

The third one is trickier. I need the &quot; be changed to the " character.

Maybe some others can benefit from this too as with import of forums, these characters are not converted.
 
Solution
Are you using phpMyAdmin?

Ensure the delimiter is not set as a ; as that will conflict with the string in the query.
1611970311443.png

Just delete it from the field or use another character if you want to run multiple queries.

Before:
1611970536633.png

Queries (note I am using | as the delimiter between queries):
1611970706806.png

After:
1611970717180.png
Are you using phpMyAdmin?

Ensure the delimiter is not set as a ; as that will conflict with the string in the query.
1611970311443.png

Just delete it from the field or use another character if you want to run multiple queries.

Before:
1611970536633.png

Queries (note I am using | as the delimiter between queries):
1611970706806.png

After:
1611970717180.png
 
Solution
Yes, using phpmyadmin.

Just delete it from the field or use another character if you want to run multiple queries.
Ahaaa... didn't know that.

Worked like a charm. Great, thanks!

I encountered also that some characters like éé and óó were changed by ?? when importing SMF. I have to do these manually because the ?? is always the same, but the characters the ' is put above are different like here in my example so I presume this can't be fixed by a query.
 
Top Bottom