We have site as you must have seen long under showcases http://www.web-praesenz.ch.
In whole of the website there are multiple occurance of word 'TYPOlight'. I wanted to have it replaced with word 'Contao', so I thought instead of replacing it one by one, why not per script.
I set to write a script and almost done it with SQL some thing like
Code:
foreach($tables as $table)
{
while($row = mysql_fetch_field($table))
{
$tn = $row->table;
$fn = $row->name;
$sql = "update $tn set $fn= replace($fn,'TYPOlight','Contao')";
mysql_query($sql);
}
}
Yes it replaced every occurance of word 'TYPOlight'. Since many fields are serialized it didn't work well. I even thought for a while and changed the SQL syntex to
Code:
$sql = "update $tn set $fn= replace($fn,'s:9:\"TYPOlight','s:6:\"Contao')";
which didn't work. Any suggestion for a lazy man here.
Bookmarks