XF 1.5 Help with MySQL query

JackieChun

Well-known member
I need to carry over values from one custom user field to another one. Some members have that field filled out and others don't. What query should I run for this? And is queries the only way to do it or is there also something in the AdminCP that can accomplish this?
 
update a
set a.field_value = z.field_value
from xf_user_field_value as a
inner join xf_user_field_value z on a.user_id = z.user_id
where a.field_id = '[Field ID of the target]' and
z.field_id = '[Field ID of the source]'
 
Back
Top Bottom