Hi, I hope this is the right place to post this (I scanned the forum and I don't think I found anything similar elsewhere)
So, this is the problem: the site I work with has been online for a few years and in the beginning, due to the low number of stories, the admins decided to create a character list for every subcategory within the site.
Now we have a fair number of stories and we found that a single, sitewide character list would be far better.
But the problem is that we have, for example, a "Harry Potter" in each subcategory, plus the sitewide one.
Is there a way, via mysql, to correct a group of stories without editing each one of them?
I mean, is it possible to do have a query that does something like "in the stories table, find every story with the charid 12345 (one of the subcategory character) and transform it into charid 98765 (the sitewide character)"?
I should point out (but I'm sure my question made it clear...) that I have next to no knowledge about mysql.
Anyway, I managed some small operations on the DB, thanks to the fact that we have an independent test site (very similar to the actual archive) to experiment with.
So is it possible or do we have to edit each story? (Without cursing other people's former choices... ;-))) )
Thank you and I hope I managed to explain myself!
You could change the categories for all the characters to -1 (I think) which means it's site wide which would achieve what you want... I originally did this for one of my archives. From the top of my head: UPDATE fanfiction_characters SET category='-1'
It seems redundant to make another character for site wide, I think, when you can just change the category for the character. Changing would also be a problem, with my HP archive I tried it but ended up manually editing all the stories. π
archive:
site:
Available for skin/mod commission! π
Already tried that, but we have lots of same name characters. For example, I have a Harry/Ron category and a Harry/Draco category. If I set bot Harrys -1, I still have two sitewide Harry, but with different charid number...
Or did I miss something? Which is highly likely, given that I'm really, really unexperienced...
Thanks anyway!
If you have overlapping characters, you'll need to reset them all to one of the characters and change that character to a sitewide character using the query Jenny posted above. I had the same problem as you (well, I set my site up originally in 1.1 which did not have sitewide characters). Fixing it was time consuming and confusing, and I still had to change a lot manually.
Okay, how do I reset every overlapping character to the one that will become sitewide?
Instead of the query Jenny posted, can I manually change the attribute of the resulting character (after the reset) to -1 to set it sitewide? (Just because it's something that *I know* I can do. As regard as the query... well, no idea. I suppose I have to use it into the query window present in our mysql database, but aside from that, nothing else...)
I know I sound dumb, but it's because I am. Think of Mysql as a foreign language and of me as a person who knows a couple of words, nothing more. I'm just good at improvisating and understanding some programmers logic, nothing more.
Thanks a lot to both of you for your flash replies!