replace bits of fields in mysql
// replace bits of fields in mysql
update `table_name` set field_name = replace(field_name,"oldtext","newtext")
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
update `table_name` set field_name = replace(field_name,"oldtext","newtext")
find . -name *.php -exec sed -i 's/oldtext/newtext/g' {} \; find . -name .svn -prune -o -exec sed -i 's/oldtext/newtext/g' {} \;
for i in $(find . -type f); do sed 's/oldstring/newstring/g' $i > $i-tmp; mv $i $i-backup; mv $i-tmp $i; done