Code: Select all
UPDATE nameoftable SET nameoftextfield = replace(nameoftextfield ,'[url]http://transfans.net','[url]http://transfans.co.uk');
UPDATE nameoftable SET nameoftextfield = replace(nameoftextfield ,'[url=http://transfans.net','[url=http://transfans.co.uk');
It's also possible to change lots of files easily if you have a flat-file wiki (or other situations where lots of files stored together want updating) -- this is one way of doing so using PHP:
Code: Select all
<?
$files=glob("*.txt");
foreach ($files as $file) {
$data=file_get_contents($file); echo "Opening ".$file;
$edit=str_replace("transfans.net","transfans.co.uk",$data);
if ($data!=$edit) { file_put_contents($file,$edit); echo " ... changes made<br>"; }
echo " ... done<br>";
}
?>