Previous Thread
Next Thread
Print Thread
Hop To
[FIXED for 7.5.6] cannot delete user group #237461 06/14/2010 2:23 PM
Joined: Jan 2007
Posts: 72
Softrak Offline OP
journeyman
OP Offline
journeyman
Joined: Jan 2007
Posts: 72
Control panel message
Script: /var/www/vhosts/softrak.com/httpdocs/ubbthreads/admin/dogroupmanage.php
Line#: 81
SQL Error: Unknown column 'uid' in 'where clause'
SQL Error #: 1054
Query: select USER_ID as uid from ubbt_USER_GROUPS where GROUP_ID = 11 and USER_ID = (select distinct USER_ID from ubbt_USER_GROUPS where GROUP_ID <> 11 and USER_ID = uid)

Express Hosting
Re: cannot delete user group [Re: Softrak] #237463 06/14/2010 2:34 PM
Joined: Dec 2003
Posts: 5,940
Ruben Offline
Offline
Joined: Dec 2003
Posts: 5,940
What version are you using?
There was a issue on the old old version that would not delete groups.
I myself am using v7.5 but I have not deleted a group in a while.

But I would search for any members that might be in the group in question first.
Remove them from the group.

Then attempt to delete the group.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: cannot delete user group [Re: Ruben] #237468 06/14/2010 5:02 PM
Joined: Jan 2005
Posts: 186
Chosen Offline
member
Offline
member
Joined: Jan 2005
Posts: 186
I have 7.5.5 and removed all the users from a group and still encountered the same error as Softrak.

Re: cannot delete user group [Re: Chosen] #237471 06/14/2010 5:16 PM
Joined: Jun 2006
Posts: 9,246
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,246
That query still needs to be fixed. For now, you can manually delete if you'd like, just make sure you use the proper group id in place of the # sign.

SQL Query
delete from ubbt_GROUPS
where GROUP_ID = '#'

Re: cannot delete user group [Re: Rick] #237476 06/14/2010 5:53 PM
Joined: Apr 2007
Posts: 3,944
SD Online Coffee
Former Developer
Online Coffee
Former Developer
Joined: Apr 2007
Posts: 3,944
admin/dogroupmanage.php

find
PHP Code
	 // How many users are in this group and another group
		$query = "
			select USER_ID  as uid
			from {$config['TABLE_PREFIX']}USER_GROUPS
			where GROUP_ID = ? 
			and USER_ID = 
				(select distinct USER_ID 
				from {$config['TABLE_PREFIX']}USER_GROUPS
				where GROUP_ID <> ? 
				and USER_ID = uid)
		";
		$sth = $dbh->do_placeholder_query($query,array($k,$k),__LINE__,__FILE__);
		$in_other = $dbh->total_rows($sth); 


replace with:

PHP Code
	 // SD:Mod fix the query to do what it is supposed to versus die ;)
		// How many users are in this group and another group
		$query = "
			select COUNT(USER_ID)
			from {$config['TABLE_PREFIX']}USER_GROUPS
			where GROUP_ID = ? 
			and USER_ID IN 
				(select distinct USER_ID 
				from {$config['TABLE_PREFIX']}USER_GROUPS
				where GROUP_ID <> ?)
		";
		$sth = $dbh->do_placeholder_query($query,array($k,$k),__LINE__,__FILE__);
		list($in_other) = $dbh->fetch_array($sth); 


note: you can leave out "SD:Mod", but that is for my notes when i've changed stuff.. i've posted this fix elsewhere on this board, but it hasn't made it into 7.5.5 yet frown

Re: cannot delete user group [Re: SD] #237486 06/15/2010 1:46 PM
Joined: Jun 2006
Posts: 9,246
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,246
Originally Posted by Sirdude

note: you can leave out "SD:Mod", but that is for my notes when i've changed stuff.. i've posted this fix elsewhere on this board, but it hasn't made it into 7.5.5 yet frown


Wasn't for lack of trying on your part. You just needed to smack me upside the head a bit harder wink

Re: cannot delete user group [Re: Rick] #237488 06/15/2010 4:32 PM
Joined: Apr 2007
Posts: 3,944
SD Online Coffee
Former Developer
Online Coffee
Former Developer
Joined: Apr 2007
Posts: 3,944
no probs Rick.. you are beezie with v8 too laugh

Re: cannot delete user group [Re: SD] #238660 08/16/2010 12:24 PM
Joined: Jun 2006
Posts: 9,246
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,246
Have the SD fix in for 7.5.6 smile

Re: cannot delete user group [Re: Rick] #238666 08/16/2010 3:35 PM
Joined: Apr 2007
Posts: 3,944
SD Online Coffee
Former Developer
Online Coffee
Former Developer
Joined: Apr 2007
Posts: 3,944
yay!

1 less thing on 'my list' laugh

Re: cannot delete user group [Re: Softrak] #243184 05/10/2011 4:16 PM
Joined: Jul 2006
Posts: 4,075
Mark S Offline
Offline
Joined: Jul 2006
Posts: 4,075
The Delete works But. . .

7.5.6

You can see you have your static Groups upto Number 5
If you create five more giving you 10 Groups then delete say number 7 it goes smile

Qwerk !
If i add a new group it goes in at number 7 and not number 11.

I was making new user groups and wanted them to show ascending.

User - Month Subscription
User - 6 Month Subscription
User - 12 Month Subscription.

I had to make a bogus group so that filled space 7
and then i had the true 11, 12, 13

Just a Heads up smile


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo
Re: cannot delete user group [Re: Mark S] #243185 05/10/2011 4:20 PM
Joined: Dec 2003
Posts: 5,940
Ruben Offline
Offline
Joined: Dec 2003
Posts: 5,940
So I guess we are back to square one?
Don't delete groups, Just edit and add?

Sounds like classic issues to me.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Re: cannot delete user group [Re: Softrak] #243194 05/10/2011 4:57 PM
Joined: Jul 2006
Posts: 4,075
Mark S Offline
Offline
Joined: Jul 2006
Posts: 4,075
group 7 came back with the old group icon too lol

Its a head up.


BOOM !! Version v7.6.1.1
People who inspire me Isaac ME Gizmo

Additional Resources
UBB Developers
UBB Wiki
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Strange Merge Issue
by Baldeagle - 08/16/2019 3:37 PM
Formatting Links
by Ty Griffin - 08/13/2019 4:39 PM
Changing from iso-8859-1 to UTF-8?
by Daryl Fawcett - 08/13/2019 9:58 AM
Threaded Mode
by ToddUGA - 08/10/2019 9:18 PM
Who's Online Now
3 registered members (Baldeagle, ECNet, SD), 57 guests, and 200 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
dslam
dslam
NJ
Posts: 50
Joined: May 2007
Show All Member Profiles 
Forum Statistics
Forums34
Topics35,320
Posts192,716
Members11,865
Most Online2,569
Jul 27th, 2019
Random Gallery Image
Latest Photos
The Sky
Land Rocks
Cozy Places
Trees
Powered by UBB.threads™ PHP Forum Software 7.7.3