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

User Error/Question.

Discussion in 'General PHP and MySQL Discussions' started by Edrondol, Jul 12, 2011.

  1. Edrondol

    Edrondol Well-Known Member

    Someone on my site posted something they shouldn't have. Their friend (whom they'd posted about) saw it and was very upset. User contacted me and asked my to remove his account, which I did. But his name is still associated with all his other posts and there's no easy way to change them as his account was already deleted.

    What command can I put in the SQL to change the name on all his posts?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Ideally you should do any user name changes before deleting accounts, as it is much more difficult to do it afterwards.

    Try this, but take a backup first!

    UPDATE xf_post SET username = REPLACE(username,'Original_Username','New_Username')

Share This Page