Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online Now
2 registered members (mmkk, Ruben), 68 guests, and 414 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
Morgan
Morgan
Sweden
Posts: 518
Joined: June 2006
Show All Member Profiles 
Top Posters(30 Days)
Gizmo 18
M4TT 12
FREAK 11
Ruben 8
mmkk 4
isaac 4
Latest Photos
Chinese Buddhist temple.
My buddha beads.
Rendered Walls
Multi-Screen wallpaper
Stockholm Metro
Previous Thread
Next Thread
Print Thread
7.5.3 Deleting User Groups #226971
06/01/09 04:09 PM
06/01/09 04:09 PM
Joined: Sep 2007
Posts: 67
Hackelton U.K.
TGCsanderson Offline OP
journeyman
TGCsanderson  Offline OP
journeyman
Joined: Sep 2007
Posts: 67
Hackelton U.K.
I get this

Script: /home/riddle6/public_html/hprpg/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 = 12 and USER_ID = (select distinct USER_ID from ubbt_USER_GROUPS where GROUP_ID <> 12 and USER_ID = uid)

Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
Re: 7.5.3 Deleting User Groups [Re: TGCsanderson] #226973
06/01/09 04:30 PM
06/01/09 04:30 PM
Joined: Mar 2009
Posts: 64
P
pinkmelon Offline
journeyman
pinkmelon  Offline
journeyman
P
Joined: Mar 2009
Posts: 64
I want to delete a user group but can not do it because there are 6 people in that group but when you click on the link showing there are 6 people it tells me there is nobody in that group

Re: 7.5.3 Deleting User Groups [Re: TGCsanderson] #226975
06/01/09 05:05 PM
06/01/09 05:05 PM
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
R
Rick Offline
Former Developer
Rick  Offline
Former Developer
R
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
Originally Posted by AshtarRose
I get this

Script: /home/riddle6/public_html/hprpg/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 = 12 and USER_ID = (select distinct USER_ID from ubbt_USER_GROUPS where GROUP_ID <> 12 and USER_ID = uid)


This is one of the places where we had to use a 4.1 MySQL query to prevent people from deleting groups that had users in them that did not belong to any other group.

So, since you're getting that error it sounds like you're stuck with the ancient MySQL 4 wink. For now, what I'd do is just relabel the group to DELETED or something like that. If you really, really need it deleted and you are sure that nobody belongs to the group, I can give you a query to delete it manually.

Re: 7.5.3 Deleting User Groups [Re: pinkmelon] #226976
06/01/09 05:06 PM
06/01/09 05:06 PM
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
R
Rick Offline
Former Developer
Rick  Offline
Former Developer
R
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
Originally Posted by pinkmelon
I want to delete a user group but can not do it because there are 6 people in that group but when you click on the link showing there are 6 people it tells me there is nobody in that group


If you know the group id, then you can verify with the following query (just change # to the actual group id):

SQL Query
select count(*) from ubbt_USER_GROUPS where GROUP_ID='#'


Re: 7.5.3 Deleting User Groups [Re: Rick] #226978
06/01/09 05:23 PM
06/01/09 05:23 PM
Joined: Dec 2003
Posts: 5,827
Lutz,FL
Ruben Online yawn

Ruben  Online Yawn


Joined: Dec 2003
Posts: 5,827
Lutz,FL
Pardon me Rick.
I was just trying this with 7.5.3. I have a custom group with one member.
My control panel states I have MYSQL 5.0.67.
When I try to delete the group I get the same error.
I even manually removed the member from the group but still get a fail on group delete. This one member is also in the default user group.


Blue Man Group


There is no such thing as stupid questions. Just stupid answers
Re: 7.5.3 Deleting User Groups [Re: Ruben] #226979
06/01/09 05:51 PM
06/01/09 05:51 PM
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
R
Rick Offline
Former Developer
Rick  Offline
Former Developer
R
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
Hmm, I'd double check what version of MySQL they actually have you running on. Run the query below from within the UBB.threads control panel:

SQL Query
show variables


Towards the bottom, you're looking for where it shows the "Version"

Re: 7.5.3 Deleting User Groups [Re: Rick] #226980
06/01/09 06:17 PM
06/01/09 06:17 PM
Joined: Dec 2003
Posts: 5,827
Lutz,FL
Ruben Online yawn

Ruben  Online Yawn


Joined: Dec 2003
Posts: 5,827
Lutz,FL
Here is what it says using the show query:
version 5.0.67-community
version_comment MySQL Community Edition (GPL)
version_compile_machine i686
version_compile_os redhat-linux-gnu


Blue Man Group


There is no such thing as stupid questions. Just stupid answers
Re: 7.5.3 Deleting User Groups [Re: Ruben] #226981
06/01/09 06:43 PM
06/01/09 06:43 PM
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
R
Rick Offline
Former Developer
Rick  Offline
Former Developer
R
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
Hmm, going to have to look into this a bit more. The query works on all of the 4.1+, 5.x MySQL installs that I just tested with (about 6 wink ), but failed in the two that are running 4.0.x

Re: 7.5.3 Deleting User Groups [Re: Rick] #226982
06/01/09 06:48 PM
06/01/09 06:48 PM
Joined: Dec 2003
Posts: 5,827
Lutz,FL
Ruben Online yawn

Ruben  Online Yawn


Joined: Dec 2003
Posts: 5,827
Lutz,FL
I sent you a PM with my test board info.
If you have time.


Blue Man Group


There is no such thing as stupid questions. Just stupid answers
Re: 7.5.3 Deleting User Groups [Re: TGCsanderson] #227006
06/03/09 03:21 PM
06/03/09 03:21 PM
Joined: Dec 2003
Posts: 5,827
Lutz,FL
Ruben Online yawn

Ruben  Online Yawn


Joined: Dec 2003
Posts: 5,827
Lutz,FL
There is a temporary fix for this in a prior post HERE
But there is a caveat per Rick so read the whole post.


Blue Man Group


There is no such thing as stupid questions. Just stupid answers
Re: 7.5.3 Deleting User Groups [Re: Ruben] #227106
06/10/09 05:31 PM
06/10/09 05:31 PM
Joined: Mar 2009
Posts: 64
P
pinkmelon Offline
journeyman
pinkmelon  Offline
journeyman
P
Joined: Mar 2009
Posts: 64
How can I be sure if there is someone in the group or not if I am told there is at one time and that there is not at another?
I moved everyone out of the group before trying to delete the group but it tells me there are 6 people...

I do not know what version of mysql is on the server
What version should I ask for 7.5.3?

Re: 7.5.3 Deleting User Groups [Re: pinkmelon] #227116
06/11/09 01:05 PM
06/11/09 01:05 PM
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
R
Rick Offline
Former Developer
Rick  Offline
Former Developer
R
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
From my earlier post:

If you know the group id, then you can verify with the following query (just change # to the actual group id):

SQL Query
select count(*) from ubbt_USER_GROUPS where GROUP_ID='#'


You'll want to at least have MySQL 4.0, but 4.1+ is preferred.

Re: 7.5.3 Deleting User Groups [Re: Rick] #231408
12/01/09 07:50 PM
12/01/09 07:50 PM
Joined: Apr 2007
Posts: 4,313
SoCal, USA
SD Offline
Carpal Tunnel
SD  Offline
Carpal Tunnel
Joined: Apr 2007
Posts: 4,313
SoCal, USA
This is still a bug in 7.5.4.2

A better and working query would be:
PHP Code
	 // 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);
 


the other query will always return an empty set (0 rows) and always cause the group delete to fail..


Shout Box
Today's Birthdays
No Birthdays
Recent Topics
Users Unable to Upload Avatar [Not a Bug]
by M4TT. 12/13/17 08:51 AM
Shout Box Sound Effect
by M4TT. 11/29/17 08:28 PM
Ad island
by TGCsanderson. 11/25/17 06:41 PM
Taking to long to connect to DB
by AstroCat. 11/24/17 12:34 PM
Forum Statistics
Forums36
Topics35,015
Posts190,544
Members12,045
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.6.1
(Snapshot build 20171106)