Help moving data from one profile feild to another

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • criscokid
    Senior Member
    • Jun 2003
    • 315
    • 3.6.x

    Help moving data from one profile feild to another

    My forum was started with vb2 - now I'm using vb3. One of the profile fields I have is city and country. Now that I'm using vb3 I've created a new country profile field which is a drop down list of all the countries.

    I'd like to move the country out of the first field and into the new country field. I assume the easiest way to do this is in mySQL? Has anyone else done anything like this or is knowledgable in what mySQL commands to use to acheive this?
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    Is it a single selection menu? If so, you can run this query to copy the values over:

    Code:
    UPDATE userfield SET fieldX = fieldY
    Where "fieldX" is the field identifer of the new field, and "fieldY" is the identifier of the old field. Backup first.

    Comment

    • Jake Bunce
      Senior Member
      • Dec 2000
      • 46598
      • 3.6.x

      #3
      Also, for this to work it is important that the old values correspond to the new values in the menu.

      Comment

      • criscokid
        Senior Member
        • Jun 2003
        • 315
        • 3.6.x

        #4
        Here's an example of entries in my (original) Location field:
        London, UK
        San Fransisco, CA, USA

        My (new) Location Country field is an alphebetical list of countries. The user simply chooses from the drop down list from now on.

        All instances of 'UK' in location field must be set as 'United Kingdom' in the location country field, 'USA' to 'United States', etc

        Location = field2
        Location country = field13

        After I've got all the countries in the Location country field set correctly I'd like to be able to use mySQL to do a where field2 = 'London, UK' make field2 = 'London'

        Comment

        • Jake Bunce
          Senior Member
          • Dec 2000
          • 46598
          • 3.6.x

          #5
          If that can be done with a simple query, I don't know what it is.

          You might try posting on www.vbulletin.org about this.

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          😀
          😂
          🥰
          😘
          🤢
          😎
          😞
          😡
          👍
          👎