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

Set prefix_id from VB iconid

Discussion in 'General PHP and MySQL Discussions' started by nrep, Jan 6, 2015.

  1. nrep

    nrep Well-Known Member

    Hi folks,

    I'm converting an old vBulletin forum that has lots of thread icons which were used in a similar way to XF prefixes.

    I've re-created the prefixes in XF, but now I'd like to transfer them over from VB to XF. The VB thread table is "thread" and the XF thread table is "xf_thread". They are in the same DB for now.

    For example, in table thread, each entry with iconid = 26 should update table xf_thread with prefix_id = 1, where thread.threadid = xf_thread.thread_id.

    Can someone help me with the SQL query for this please? I'm terrible with SQL and can't see where to begin when I read tutorials using UPDATE/SET across 2 tables.
    Last edited: Jan 6, 2015
  2. nrep

    nrep Well-Known Member

    I think this may have done it:

  3. tyteen4a03

    tyteen4a03 Well-Known Member

    It's probably a better idea to separate the two forums's tables.
  4. nrep

    nrep Well-Known Member

    Once it's imported and fully sorted, I'll be deleting all of the old tables entirely :).

Share This Page