Previous Thread
Next Thread
Print Thread
Hop To
Need a bit of SQL help #218405 10/25/2008 10:38 AM
Joined: Jun 2006
Posts: 106
Flyin V Offline OP
member
OP Offline
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


Re: Need a bit of SQL help [Re: Flyin V] #218418 10/26/2008 10:42 AM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
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
Forum Search
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Subscriptions Question
by Ruben - 01/14/2020 12:11 PM
Page won't load after 7.7.3 Update
by Jim0421 - 01/08/2020 11:11 AM
Ubb 7.7.3 winkey emoji shortcut issue
by Ruben - 01/07/2020 4:04 PM
testing winkey emoji shortcut
by Ruben - 01/06/2020 2:36 PM
Very strange problem
by Baldeagle - 01/05/2020 1:22 PM
Who's Online Now
0 members (), 71 guests, and 381 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20200106)