Set prefix_id from VB iconid

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:
I think this may have done it:

UPDATE xf_thread, thread
SET xf_thread.`prefix_id` = 1
WHERE thread.`iconid`=26 AND xf_thread.`thread_id`=thread.`threadid`;
 
Back
Top Bottom