Announcement

Collapse
No announcement yet.

changing username in db syntax help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lats
    replied
    That's a good warning there Andy, should have mentioned that myself.

    Leave a comment:


  • Andy
    replied
    Be very careful when you run the query that Lats suggested, because if you are updating a user name that could be part of a regular word, then you will mess up many posts.

    If the user name is a common part of a word, it would be best to only update the quoted part of any post where that member was quoted.

    Here is an example:

    UPDATE post SET pagetext = REPLACE(pagetext, '=oldname', '=newname')

    Change oldname and newname as needed.

    Leave a comment:


  • Lats
    replied
    Try this query...
    Code:
    UPDATE 
        post
    SET 
        pagetext = replace(pagetext,'oldname', 'newname') 
    WHERE 
        pagetext LIKE '%oldname%'

    Leave a comment:


  • deirdre
    replied
    That doesn't do what I wanted though. (i didn't actually see anything done).

    For example if I changed my name to Rosey here and someone had been talking to me and said "hey deirdre, I like your avatar."

    I want to run a query that basically does: whenever you see the name Deirdre in posts, change it to Rosey.

    Is that possible?

    Leave a comment:


  • Jake Bunce
    replied
    After renaming a user you need to run this:

    Admin CP -> Maintenance -> Update Counters -> Update User Names

    Leave a comment:


  • deirdre
    started a topic changing username in db syntax help

    changing username in db syntax help

    I am wondering if there is a way to go into the database and change all the instances of a particular member name to that person's new name in the current posts?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X