How to replace a given string inside a mysql table?

Ιουλίου 23, 2010

Just use the fabulous command REPLACE provided by mysql. The syntax goes like this: update database_table set table_column = replace (table_column, «oldstring», «newstring»); For instance, to replace all occurrences of «modules» inside the linuxformat.gr drupal db with «sites/all/modules» I typed in: update linuxformat_system set filename = replace (filename, «modules», «sites/all/modules»);

3

Name-based Virtual Hosts in Apache

Ιουλίου 14, 2010
Tags:

Name-based virtual hosting enables us to serve different domains from a single server. All we need is to add this line to /etc/apache2/sites-available/default: NameVirtualHost * The * specifies that Apache will serve requests for all IP addresses; optionally we can specify only a certain IP on the server. Next, we create a new for each [...]

0