Take away brackets in placenames

From TNG_Wiki
Jump to navigation Jump to search

This takes away brackets ( and ) in place names. You could easily change this to other brackets [,],{,} etc.

Copy and paste the text between the lines into the MySQL section of your MySQL admin, IMPORTANT: Make a backup before you try anything and use this at your own risk!


UPDATE tng_families SET marrplace = REPLACE(marrplace,' ) ','');
UPDATE tng_families SET divplace = REPLACE(divplace,' ) ','');
UPDATE tng_people SET birthplace = REPLACE(birthplace,' ) ','');
UPDATE tng_people SET altbirthplace = REPLACE(altbirthplace,' ) ','');
UPDATE tng_people SET deathplace = REPLACE(deathplace,' ) ','');
UPDATE tng_people SET burialplace = REPLACE(burialplace,' ) ','');
UPDATE tng_events SET eventplace = REPLACE(eventplace,' ) ','');


UPDATE tng_families SET marrplace = REPLACE(marrplace,' ( ',', ');
UPDATE tng_families SET divplace = REPLACE(divplace,' ( ',', ');
UPDATE tng_people SET birthplace = REPLACE(birthplace,' ( ',', ');
UPDATE tng_people SET altbirthplace = REPLACE(altbirthplace,' ( ',', ');
UPDATE tng_people SET deathplace = REPLACE(deathplace,' ( ',', ');
UPDATE tng_people SET burialplace = REPLACE(burialplace,' ( ',', ');
UPDATE tng_events SET eventplace = REPLACE(eventplace,' ( ',', ');
DELETE FROM `tng_places` WHERE `place` like "% ( %";

UPDATE tng_families SET marrplace = REPLACE(marrplace,')','');
UPDATE tng_families SET divplace = REPLACE(divplace,')','');
UPDATE tng_people SET birthplace = REPLACE(birthplace,')','');
UPDATE tng_people SET altbirthplace = REPLACE(altbirthplace,')','');
UPDATE tng_people SET deathplace = REPLACE(deathplace,')','');
UPDATE tng_people SET burialplace = REPLACE(burialplace,')','');
UPDATE tng_events SET eventplace = REPLACE(eventplace,')','');


UPDATE tng_families SET marrplace = REPLACE(marrplace,' (',', ');
UPDATE tng_families SET divplace = REPLACE(divplace,' (',', ');
UPDATE tng_people SET birthplace = REPLACE(birthplace,' (',', ');
UPDATE tng_people SET altbirthplace = REPLACE(altbirthplace,' (',', ');
UPDATE tng_people SET deathplace = REPLACE(deathplace,' (',', ');
UPDATE tng_people SET burialplace = REPLACE(burialplace,' (',', ');
UPDATE tng_events SET eventplace = REPLACE(eventplace,' (',', ');
DELETE FROM `tng_places` WHERE `place` like "% (%";