11
intel352
Re: Need Help with MySQL syntax to merge two xoops_user tables
  • 2004/12/12 10:11

  • intel352

  • Module Developer

  • Posts: 824

  • Since: 2003/11/23


make sure you run this via phpmyadmin

what were the changes you made? (post 'em?)

12
brash
Re: Need Help with MySQL syntax to merge two xoops_user tables
  • 2004/12/12 10:16

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Weird, for some reason it didn't like the databasename.tablename format. I just ran the query directly on the database so that it was just tablename and it's all good now by the looks. Thanks a bundle bd_cmsc !

13
intel352
Re: Need Help with MySQL syntax to merge two xoops_user tables
  • 2004/12/12 10:18

  • intel352

  • Module Developer

  • Posts: 824

  • Since: 2003/11/23


my pleasure. again, make sure you update groups as well.


14
brash
Re: Need Help with MySQL syntax to merge two xoops_user tables
  • 2004/12/12 10:49

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Doh! Didn't think I'd get away with it this cleanly . As the UID of everyone has changed I'll need to go through NewBB 2 and change the uid field in the xoops_bb_posts table so that they are correct.

Would this be the correct syntax to use?

UPDATE xoops_bb_posts SET uid=<new uid numberWHERE uid=<old uid number>

15
intel352
Re: Need Help with MySQL syntax to merge two xoops_user tables
  • 2004/12/12 21:20

  • intel352

  • Module Developer

  • Posts: 824

  • Since: 2003/11/23


that should work. make sure you test first, lol.

16
brash
Re: Need Help with MySQL syntax to merge two xoops_user tables
  • 2004/12/13 0:06

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Wow, that was a bit more work than I thought. The more I looked, the more places I found where tables were using the UID field (comments, forums). Just lucky that I only have a few dozen people that have actually posted otherwise it would have been a total nightmare. As it was there are some records I can't update without doing it manually by hand due to UID conflicts.

NOTE TO ALL LOOKING TO USE THIS SCRIPT: If you have a large user base to merge with a large amount of forum and comment posts, then this script will need further work. Also if you have advanced group setups, this script as is will not retain group memberships of any non standard groups (webmasters, registered users, anonymous).

Now to get AMS ready to launch

17
intel352
Re: Need Help with MySQL syntax to merge two xoops_user tables
  • 2004/12/13 3:51

  • intel352

  • Module Developer

  • Posts: 824

  • Since: 2003/11/23


my best recommendation is to act like you're taking the site back up from scratch

but that's just me

18
brash
Re: Need Help with MySQL syntax to merge two xoops_user tables
  • 2004/12/13 4:02

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Hey db_cmsc,

Just noticed that the group manager interface has changed since the merge.

It used to look like this;

Resized Image



But since the merge it looks like;

Resized Image


This new interface while still functional is not as good as the old one, and makes it impossible to see who is not a member of a particular group. Any ideas why this would have changed by running that query?

19
intel352
Re: Need Help with MySQL syntax to merge two xoops_user tables
  • 2004/12/13 4:56

  • intel352

  • Module Developer

  • Posts: 824

  • Since: 2003/11/23


after a certain number of users have been reached, XOOPS changes the user listing method. i'm not a big fan of it either, since you can't do mass moves to/from groups, but once you hit a certain number of users, it's pretty near impossible to easily use the scroll list anyways.


sorry bud, XOOPS functions and whatnot

20
brash
Re: Need Help with MySQL syntax to merge two xoops_user tables
  • 2004/12/13 5:06

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Pooz and weez . That is a crap "feature", it has just made the job of trying to administer users 100x harder, simply because I can now no longer see who isn't a member of a given group. This ability is just as important as being able to see who is a member of a group. Or am I missing something here, because it seems to me to be a fairly big oversight .


**EDIT**

Sorry for negative attitude above, frustration got the better of me. It seems now my only option for finding out if a partiular user is a member of a large group is to hope that they contact me somehow when they are unable to access something as they should.

Perfect example is twitaman lost membership to the registered user group during the merge (see this thread)), and once logged in got a blank screen as he wasn't a member of any group. I know you warned me this would happen, I just didn't expect the change in admin interface. I might have to take you up on that offer to create the SQL to add all users to the registered users group.

I think the find users method of adding users to a group is a top idea, it just hasn't gone nearly far enough to realise even half of its potential.

Login

Who's Online

209 user(s) are online (147 user(s) are browsing Support Forums)


Members: 0


Guests: 209


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits