The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
mass update of users Help...
I need to do a mass update of users based on some field in different tables
I have written some SQL but it would not work under mysql (in the office DB2 and oracle are ok with this kind of sql) This is what I am trying to run : Code:
UPDATE user,userfield SET user.usergroupid=8 WHERE userfield.userid=user.userid AND userfield.field8= 'United Kingdom' AND user.usergroupid='5' Thanks LeMarsu |
#2
|
||||
|
||||
hmm i don't know the update command very well, but maybe this will work:
[sql]UPDATE user LEFT JOIN userfield USING(userid) SET usergroupid=8 WHERE field8='United Kingodm' AND usergroupid=5[/sql] |
#3
|
||||
|
||||
that doesn't work as well !!
There is something in myphp I don't get ! I can only do simple update Queries ! I don't know where I read this but apparently you can do updates with joins in mySQL ... can that be true !!? LeMarsu ... need HELP !!! |
#4
|
||||
|
||||
when it doesn't work, what happens? if you just copied xenons query exactly it had a spelling error at Kindom
|
#5
|
||||
|
||||
this is the error I get :
Quote:
|
#6
|
||||
|
||||
I found this posts on the web...
http://www.geocrawler.com/archives/3...9/3/0/1441850/ Quote:
|
#7
|
||||
|
||||
that means you have to write a script which selects u the rows to update at first:
PHP Code:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|