how to find and replace data in mysql
To find a string in a certain field and replace it with another string:
update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');
e.g.
update wp_posts set post_content = replace(post_content,'ramseyramos.com','ramseyramos.net');
About this entry
You’re currently reading “how to find and replace data in mysql,” an entry on pakapblog!
- Published:
- 5.1.09 / 8am
- Category:
- Codes
- Tags:
No comments
Jump to comment form | comments rss [?] | trackback uri [?]