We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Forum Module - PHPmyadmin and linking two accounts

Development and Programming

adambeazley's avatar
adambeazley
153 posts
16 years ago
adambeazley's avatar adambeazley

Hey everyone, I have a question, I have a good working forum that I brought in from phpbb a while back, however I have 2 admin accounts that I would like to put into one.

Basically the EE Admin(Adam Beazley ID=1624) account that I currently use is the account that I would like to keep and post from. However the original account in the phpbb forums (adambeazley ID=3) is the one that I have done the bulk of my posts from.

Is there any way to basically take all of the posts made from ID=3 and have them link to the ID=1624 account? Is this possible?

Let me know if this is possible, Im sure it has something to do with making some changes in the database via phpmyadmin.

Thanks again,

Adam

       
adambeazley's avatar
adambeazley
153 posts
16 years ago
adambeazley's avatar adambeazley

~tap~tap~tap~ is this thing on?

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
16 years ago
Ingmar Greil's avatar Ingmar Greil

I don’t see why an SQL query shouldn’t be able to do it. Basically you want to rewrite all entries from one entry_id to the other, not that difficult. Be sure to make a backup first.

       
adambeazley's avatar
adambeazley
153 posts
16 years ago
adambeazley's avatar adambeazley

Thanks Ingmar,

I guess my question really is, what would the SQL query/s be. Because it seems that with the forum moduel there are alot of different places where these links happen. Would you care to elaborate on the specific things that need to happen?

Thanks

       
Pascal Kriete's avatar
Pascal Kriete
2,589 posts
16 years ago
Pascal Kriete's avatar Pascal Kriete

In essence you need to change any of the author_id fields in the forum tables. You’ll want more than one query to do this safely.

Let’s see, these would definitely need updating:

exp_forum_topics - author_id exp_forum_posts - author_id exp_members - total_forum_topics & total_forum_posts

If you care for them, you can also grab exp_forum_polls and exp_forum_subscriptions, but they’re not vital. And I think that should do it for your purposes.

Definitely backup your database before playing around with these. And I would suggest keeping the old account, even if you don’t use it (just in case).

       
adambeazley's avatar
adambeazley
153 posts
16 years ago
adambeazley's avatar adambeazley

the total_forum_topics & total_forum_posts couldn’t i just use that little “recount statistics” utility in EE to update those values accurately?

Also I’m a bit rusty on the SQL queries, would this work:

UPDATE exp_forum_topics SET author_id = ‘1624’ WHERE author_id = ‘3’; UPDATE exp_forum_posts SET author_id = ‘1624’ WHERE author_id = ‘3’;

Where the author_id of the user I want to use permanently is 1624.

Also, the exp_forum_subscriptions uses member_id not author_id. How does all of this correlate with the member_id?

       
adambeazley's avatar
adambeazley
153 posts
16 years ago
adambeazley's avatar adambeazley

does that query look correct?

       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
16 years ago
Ingmar Greil's avatar Ingmar Greil

Yes, looks good. Since you are going to make a backup anyway, why not just try it? 😊

       
adambeazley's avatar
adambeazley
153 posts
16 years ago
adambeazley's avatar adambeazley

alright, It worked great.

Thanks guys

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.