PDA

View Full Version : Mass update users based on userfield value


t3nt3tion
01-31-2008, 06:48 PM
I`m trying to move users from registered members usergroup to a usergroup I created based on a custom field value, and i`d like to do this with a SQL statement, particularly this one :

update user set usergroupid = 10 where userid in
(select userid from user
inner join userfield on
user.userid = userfield.userid
where userfield.field7 = 'valueinputedbyme');

Thing is I`m receiving a "userid" ambigous field error ...
Waiting for your replies https://vborg.vbsupport.ru/

And yes, I know this has been asked a few times, but I didn`t see any "finishing" replies that something actually worked.

t3nt3tion
02-02-2008, 09:26 PM
* bump *

Demo16
02-11-2008, 05:28 PM
Have you solved the problem?

t3nt3tion
02-11-2008, 05:37 PM
No, but when I have time, I`ll make a custom mini php script, so it will move them at regular times. But I`ll check more on vBulletin, and hopefully I`ll make a plugin, since it`s not much of a deal.

HUMMERh3
03-01-2008, 05:23 PM
I have a similar prob, all new members were to be moderated, unfortunately the promotions was set incorrect, can I reverse all these members that have bypassed usergroup.