Ceci est une ancienne révision du document !
REPLACE / UPDATE
Pour remplacer des chaînes de caractères dans des bases de données MySQL
http://sql.sh/fonctions/replace
REPLACE(str,from_str,to_str)
Returns the string str with all occurrences of the string from_str replaced by the string to_str. REPLACE() performs a case-sensitive match when searching for from_str.
mysql> SELECT REPLACE('www.mysql.com', 'w', 'Ww');
-> 'WwWwWw.mysql.com'
UPDATE table
SET nom_colonne = REPLACE(nom_colonne, 'ancien texte', 'texte de remplacement')
ex:
UPDATE dc_post
SET post_excerpt = replace(post_excerpt,"cms/dotclear","blog");
ex. avec php
$replace = mysql_query(" replace into recet (id, prov, titre, temps, ingr, pers, typ, prep, date) VALUES ('$id', '$prov', '$titre', '$temps', '$ingr', '$pers', '$typ', '$prep', '$date')");