MyBB Community Forums

Full Version: Change username for posts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

I have an announcement forum where my account is the only one to post messages in that specific forum. I have decided to make another account where all official posts will be done under that account.

How do I change the posts username from my previous messages to show them as if they were posted by my newly added nickname if that makes sense. I can do this manually in phpMyadmin changing the userid, and the nickname but I have soooo many posts, it's very time consuming.

Any shortcuts?

Was thinking along the line of an SQL query?
Use UPDATE, SET, and WHERE in SQL.

Example, in your case:

UPDATE prefix_posts
SET username = YourNewName, uid = YourOldID
WHERE username = YourOldName

Such as:

UPDATE mybb_posts
SET username = Masayoshi, uid = 1
WHERE username = Kelly
^ changes user name for all the posts (NOT for the specific forum) ...
Luckily you pointed that out.

UPDATE mybb_posts
SET username = Masayoshi, uid = 1
WHERE username = Kelly AND fid = 2

While "fid" is the ID of the specific forum you want
Says there is an error near AND fid = 4
Because Masayoshi's code is wrong.

UPDATE mybb_posts SET username = 'Masayoshi', uid = 1 WHERE username = 'Kelly' AND fid = 2