Previous Thread
Next Thread
Print Thread
Hop To
#218405 10/25/2008 11:38 AM
Joined: Jun 2006
Posts: 106
member
member
Joined: Jun 2006
Posts: 106
Hey nice forum people smile

Can you help me with an SQL statement to add all my existing users to a new group? The new groupID number is 13.

Thanks,
Jeff


Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
If you're running MySQL 4.1+ you can use the following:

SQL Query
insert into ubbt_USER_GROUPS 
(GROUP_ID,USER_ID) 
select '#', USER_ID from ubbt_USERS 
where USER_ID <> 1

Replace the # in that query with the new group number.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
8.0.1 Patch Changelog Discussion
by isaac - 11/26/2025 1:34 PM
Upgraded to ver8 - now can't login
by phoenix011235 - 10/24/2024 8:50 AM
Who's Online Now
1 members (Phun), 259 guests, and 127 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)