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

XF 1.1 Query To Add Prefix To All Threads in X Forum

Morgain

Well-known member
#4
Thanks Jake. Where can I look up how to do a query?

Can a query do a series of forums in one go if the prefix added is the same
applying the prefix to a whole lot of forums?
 

Jake Bunce

XenForo moderator
Staff member
#5
You can run queries using phpmyadmin which is a program that many hosts will preinstall for you.

Here is a query to specify multiple nodes:

Code:
UPDATE xf_thread
SET prefix_id = 1
WHERE node_id IN (29,30,31,32);
 

graham_w

Active member
#7
Code:
UPDATE xf_thread
SET prefix_id = 1
WHERE node_id = 29;
You need to specify the prefix_id and node_id.

Hi Jake
I'd like to use this to change all prefixes on threads older than 6 months (or 180 days) old. Would I need to add :

and post_date < xxxxxxxxxxxx;

and work out the date code for 180 days ago ?
 

Jake Bunce

XenForo moderator
Staff member
#8
Hi Jake
I'd like to use this to change all prefixes on threads older than 6 months (or 180 days) old. Would I need to add :

and post_date < xxxxxxxxxxxx;

and work out the date code for 180 days ago ?
Try this:

Code:
UPDATE xf_thread
SET prefix_id = 1
WHERE node_id = 29
AND post_date < UNIX_TIMESTAMP() - (86400*180);