PDA

View Full Version : Move profile field8 by sql query


woostar
07-05-2008, 06:23 PM
Hi all :D

need a hand if anyone can help.

I want to do a sitewide move of:-
User Profile Fields (field8)
into 'user' table 'usertitle'

So that's every members 'field8' into their 'usertitle'.

Problem is I can't find 'User Profile Fields (field8)'
Can anyone help me with the query I can insert into phpmyadmin?

Thanks in advance :)

Dismounted
07-06-2008, 06:12 AM
UPDATE user
SET user.usertitle = userfield.field8
LEFT JOIN userfield USING (userid)
Not tested, so you might want to try on a test board first.

woostar
07-06-2008, 11:27 AM
nope :( - soooo close.

any other idea's :D

Opserty
07-06-2008, 11:50 AM
Other way round... :D

UPDATE user
LEFT JOIN userfield USING (userid)
SET user.usertitle = userfield.field8

Dismounted
07-06-2008, 03:15 PM
Ah, that's right. I always confuse the order on an update.

woostar
07-06-2008, 05:36 PM
Beautiful, worked like a charm. Thank you both for your help :)