1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Fix apostrophes with \ character in front

Discussion in 'XenForo Questions and Support' started by Brentnauer, Sep 13, 2014.

  1. Brentnauer

    Brentnauer Well-Known Member

    Hi there,

    I have an import from an old UBB forum and I have many thousands of instances of things like Re: Titor\'s Collapse Still Nowhere In Sight

    Is there a query I can run that will fix thins like this? I imagine I'd want to run something like this:

    UPDATE xf_post SET message = REPLACE(message, '\\'','\'')
    Is this the correct way?
  2. Brentnauer

    Brentnauer Well-Known Member

    I made a backup and took a leap of faith... Didn't work though. I get:

    #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\'')' at line 2

    I'm sure I'm making an amateurish mistake; any help would be appreciated :)
  3. Brentnauer

    Brentnauer Well-Known Member

    Fixed it.

    UPDATE xf_post SET message = REPLACE(message, '\\''', '''')

Share This Page