Yeah, I get it needs writing. That's why I'm asking in the Programming Discussions forum.
I'm sure it can be done just with an SQL query in a similar way to how mass assigning of prefixes was when I asked before:
https://vborg.vbsupport.ru/showthread.php?t=299427
I'd attempt it myself if I wasn't so terrified of messing up the query and wrecking things!
--------------- Added [DATE]1416676693[/DATE] at [TIME]1416676693[/TIME] ---------------
Looking at the database, it seems it needs a new row inserted into cms_nodecategory, consisting of just categorid and nodeid.
If that's all it is, it shouldn't be too hard. But is there anything else I should be aware of? I've glanced through the cms tables and don't immediately see anything else referencing articles -> categories.
Assuming that's the case, I guess it'd be something like:
INSERT INTO cms_nodecategory (categoryid, nodeid) VALUES (x, y);
but Google tells me INSERT doesn't support a WHERE statement, so I can't add anything WHERE article.title LIKE '%Z%'
So I'm guessing it needs some kinda SELECT stuff first, but I'm out of my depth at that point!