1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Mass move "Location" info from imported custom field, to XF *stock* 'Location' field?

Discussion in 'XenForo Questions and Support' started by CyclingTribe, Oct 27, 2011.

  1. CyclingTribe

    CyclingTribe Well-Known Member

    When I import from IP.Board it creates my custom fields, one of which is "Location".

    XF has its own built-in Location field so how would I mass move the data from my custom field to the built-in XF one?

    Shaun :D
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Run this query on your database:

    UPDATE xf_user_profile AS up
    SET up.location = (
    	SELECT ufv.field_value
    	FROM xf_user_field_value AS ufv
    	WHERE ufv.user_id = up.user_id
    	AND ufv.field_id = 'customfield'
    You just need to enter the field_id of your custom location field.
    Alfa1, Andrej and CyclingTribe like this.
  3. CyclingTribe

    CyclingTribe Well-Known Member

    Many thanks Jake :)

Share This Page