Stuart Wright
Well-known member
I've suggested here the ability to batch update nodes, which isn't going to happen before I upgrade AVForums.
I have over 240 nodes to edit, so I need a query to update all children of a specific category node. We have 8 categories that I need to apply this to.
I've got two bits of SQL prepared. This one updates the nodes with the options I want:
Is there an SQL guru out there who can help with this second query to get all the nodes it should do, please?
Thanks
I have over 240 nodes to edit, so I need a query to update all children of a specific category node. We have 8 categories that I need to apply this to.
I've got two bits of SQL prepared. This one updates the nodes with the options I want:
and I'm trying to find a query to return all the node_ids given each individual category ID (there are only 8 categories):UPDATE xf_forum set type_config = {"allowed_thread_types":["poll","article","question"],"allow_answer_voting":true,"allow_answer_downvote":false} where node_id IN...
But this second query is returning one less node that it should be.select node_id,
title,
parent_node_id
from (select * from xf_node
order by parent_node_id, node_id) xf_node,
(select @pv := '295') initialisation
where find_in_set(parent_node_id, @pv) > 0
and @pv := concat(@pv, ',', node_id)
Is there an SQL guru out there who can help with this second query to get all the nodes it should do, please?
Thanks