Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
by mistake i removed the founder account from database
#11
@Lunor

UPDATE mybb_posts SET pid=$YourID WHERE pid=$OtherID

From there you gotta rebuild it, and if you want your old ID, just simply change the user ID's to match the post's owner

All in the DB of course.
Like to sin? Sinful Forums
Reply
#12
This user has been denied support. This user has been denied support.
(09-12-2017, 03:45 AM)Ben Cousins Wrote:
(09-12-2017, 03:36 AM)Lunorian Wrote:
(09-08-2017, 10:02 PM)Michael_vx Wrote: please no worry the admin problem is fixed already Smile
the only problem is the old admin posts i want it to be belongs to the new admin instead of visitor

You'll have to go through each post and thread made by the old account and edit the DB to do that. Have fun with an extremely long and boring data entry task Wink

Nup.

Code:
UPDATE mybb_posts SET pid=$newadminid WHERE pid=$oldadminid

At which point you'll have to do a recount/rebuild

You also need to update the threads table. Among recounts, and a ton of other edits to make things work perfect. It's not some simple one query task.
I used to have faith that MyBB would one day accept feedback and become better software - I was wrong. I've switched to NodeBB. Goodbye Everyone Sad
Reply
#13
(09-13-2017, 12:17 PM)Lunorian Wrote:
(09-12-2017, 03:45 AM)Ben Cousins Wrote:
(09-12-2017, 03:36 AM)Lunorian Wrote:
(09-08-2017, 10:02 PM)Michael_vx Wrote: please no worry the admin problem is fixed already Smile
the only problem is the old admin posts i want it to be belongs to the new admin instead of visitor

You'll have to go through each post and thread made by the old account and edit the DB to do that. Have fun with an extremely long and boring data entry task Wink

Nup.

Code:
UPDATE mybb_posts SET pid=$newadminid WHERE pid=$oldadminid

At which point you'll have to do a recount/rebuild

You also need to update the threads table. Among recounts, and a ton of other edits to make things work perfect. It's not some simple one query task.

Or, you could change the ID of your new user account - in which case it would be a one query, recount, rebuild task. More than one way to skin a cat.
[Image: aJQTgYK.png]
How does Asperger's Network work? Behind Asperger's Network is a behind the scenes look at our inner workings!
Reply
#14
the user ID needed to be changed from 2 to 1 so i can get back my admin panel
the user should been 1 but after merging it became 2 and i lost the added user in place of 1
i will use the DB to move all posts to the user ID 1
Reply
#15
@Michael_vx - Ben Cousins advice is correct. You need to run that query in phpMyAdmin (replacing the variables with the correct IDs), recount and rebuild threads and posts, and then report back if there are any other problems.
Reply
#16
(09-17-2017, 02:11 PM)Wildcard Wrote: @Michael_vx - Ben Cousins advice is correct. You need to run that query in phpMyAdmin (replacing the variables with the correct IDs), recount and rebuild threads and posts, and then report back if there are any other problems.

I advise against changing poster ids, I would prefer user changed a new account's id.
[Image: aJQTgYK.png]
How does Asperger's Network work? Behind Asperger's Network is a behind the scenes look at our inner workings!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)