Previous Thread
Next Thread
Print Thread
Hop To
Joined: Jun 2006
Posts: 197
E
enthusiast
enthusiast
E Offline
Joined: Jun 2006
Posts: 197
I'm running the new 7.1.1 version and once a month I 'upgrade' members that have more then 4 posts. I just did a migration and today I try to do it.

I selected all members who had posts (>4) and were registered before May 01.
It brought about 22 members.
Then I select the 'Change Groups' options and removed from one group and add to another group.
Got this SQL error:

"SELECT t1.USER_ID,t4.GROUP_ID FROM ub_USERS as t1, ub_USER_GROUPS as t4 WHERE t1.USER_ID <> '1' and t1.USER_ID = t4.USER_ID and USER_REGISTERED_ON < '1177992000' and USER_IS_BANNED = '0' and t2.USER_TOTAL_POSTS > '0' and t2.USER_TOTAL_POSTS > '4' and t4.GROUP_ID IN (5) GROUP BY USER_ID ORDER BY USER_ID ASC

Unknown table 't2' in where clause"

Any idea how to fix it?
Thank you

It happens if I choose to do the change with 'All Members in Search '.
If I choose Selected Members (on this page) and select the members there is no error.

Last edited by Rick; 05/31/2007 12:38 PM.
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
You can fix this by editing the dochangeusergroups.php script. Line 126 currently has this:

$aquery = "SELECT t1.USER_ID,t4.GROUP_ID FROM {$config['TABLE_PREFIX']}USERS as t1, {$config['TABLE_PREFIX']}USER_GROUPS as t4 WHERE t1.USER_ID <> '1' and t1.USER_ID = t4.USER_ID $removed $aquery";

Change that, to this:

$aquery = "SELECT t1.USER_ID,t4.GROUP_ID FROM {$config['TABLE_PREFIX']}USERS as t1, {$config['TABLE_PREFIX']}USER_GROUPS as t4, {$config['TABLE_PREFIX']}USER_PROFILE as t2 WHERE t1.USER_ID <> '1' and t1.USER_ID = t4.USER_ID and t1.USER_ID = t2.USER_ID $removed $aquery";

Joined: Jun 2006
Posts: 197
E
enthusiast
enthusiast
E Offline
Joined: Jun 2006
Posts: 197
Hi Rick,
Should I assume that on the next release it will be fix?
Or do I have to keep it to do again after future updates?
Thank you for the correction. It's applied and worked. smile

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Yep, this will be fixed for the next release wink


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
0 members (), 963 guests, and 237 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)