|
|
Joined: Feb 2007
Posts: 1,294 Likes: 2
Veteran
|
Veteran
Joined: Feb 2007
Posts: 1,294 Likes: 2 |
Is there a way in SQL through the message board to determine if a group of users are the age of 21 or older and also add those users to a specific group?
Last edited by JAISP; 07/07/2016 2:15 PM.
|
|
|
|
Joined: Jun 2006
Posts: 16,299 Likes: 116
|
Joined: Jun 2006
Posts: 16,299 Likes: 116 |
This should get you the data you're looking for: SELECT
up.`USER_ID` , u.`USER_DISPLAY_NAME`
FROM
`ubbt_USERS` AS u, `ubbt_USER_PROFILE` AS up
WHERE
up.`USER_BIRTHDAY` <= (now()-31557600) AND
up.`USER_ID`!='1' AND
u.`USER_ID` = up.`USER_ID` Though, adding a user to a group based on that query is more complicated.
|
|
|
|
Joined: Feb 2007
Posts: 1,294 Likes: 2
Veteran
|
Veteran
Joined: Feb 2007
Posts: 1,294 Likes: 2 |
I'm guessing it would be easier to write a new field in the Advanced Search of the Member Managament section of the Control Panel to search for an entered age selection. This would then allow for mass group change and or selection in the long run.
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
|
|
|
1 members (Ruben),
1,057
guests, and
268
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|
|