Nudaii Well-known member Feb 27, 2014 #1 is there a way to copy the contents of the "location" field to a custom profile field? If so what would be the SQL query?
is there a way to copy the contents of the "location" field to a custom profile field? If so what would be the SQL query?
Jake Bunce Well-known member Feb 27, 2014 #2 Usually people go the opposite direction: http://xenforo.com/community/thread...to-xf-stock-location-field.22221/#post-279132 If you want to go location to custom field then use this: Rich (BB code): UPDATE xf_user_field_value AS ufv SET ufv.field_value = ( SELECT up.location FROM xf_user_profile AS up WHERE ufv.user_id = up.user_id ) WHERE ufv.field_id = 'customfield'; Then rebuild the user cache: Admin CP -> Tools -> Rebuild Caches -> Rebuild User Caches Backup to be safe. Upvote 0 Downvote
Usually people go the opposite direction: http://xenforo.com/community/thread...to-xf-stock-location-field.22221/#post-279132 If you want to go location to custom field then use this: Rich (BB code): UPDATE xf_user_field_value AS ufv SET ufv.field_value = ( SELECT up.location FROM xf_user_profile AS up WHERE ufv.user_id = up.user_id ) WHERE ufv.field_id = 'customfield'; Then rebuild the user cache: Admin CP -> Tools -> Rebuild Caches -> Rebuild User Caches Backup to be safe.