Frage
Gibt es in MySQL eine Funktion wie str_replace in PHP
Frage von ask   |   vom 07.04.2014 - 08:53   |   Kategorie Internet
Ich suche eine Möglichkeit wie in PHP mit der Funktion str_replace() in MySQL Ersetzungen vorzunehmen. Gibt es in MySQL eine ähnliche Funktion wie str_replace()?
0
Antwort
Antwort von coder   |   vom 07.04.2014 - 22:51
Zur PHP-Funktion str_replace gibt eine nahezu identische Funktion in MySQL ...

Beispiel in PHP
Code
01
02
03

$content = str_replace('und','&',$content);

Beispiel in MySQL
Code
01
02
03

UPDATE `table` SET `content` = REPLACE(`content`,'und','&') WHERE ...
0