Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
1 registered (A-GATE), 28 Guests and 14 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 12/20/03
Posts: 4424
Top Posters (30 Days)
Ruben 51
Gizmo 24
DennyP 24
Dunny 15
SteveS 13
AllenAyres 12
SD 10
dbremer 10
drkknght00 9
doug 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Page 2 of 2 < 1 2
Topic Options
#227106 - 06/10/09 06:31 PM Re: 7.5.3 Deleting User Groups [Re: Ruben]
pinkmelon Offline
journeyman
Registered: 03/19/09
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?
Top
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."
#227116 - 06/11/09 02:05 PM Re: 7.5.3 Deleting User Groups [Re: pinkmelon]
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: 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.
Top
#231408 - 12/01/09 07:50 PM Re: 7.5.3 Deleting User Groups [Re: Rick]
SD Offline
Registered: 04/19/07
Posts: 4056
Loc: 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..
_________________________

Threads tutorials . Threads & Wordpress experts . UBB resume

If I you, click this link as to why
Top
Page 2 of 2 < 1 2



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Temporary Password email not being received
by
05/24/12 10:02 PM
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Forum Stats
10492 Members
36 Forums
33842 Topics
181709 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image