MySQL Replace String, Similar to PHP str_replace()

Very handy function if you need to replace a string in your MySQL database tables.

UPDATE table
SET field = REPLACE(field, 'Old Value', 'New Value')

Reference

MySQL String Functions
http://dev.mysql.com/doc/refman/5.1/en/string-functions.html

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Related Posts

Tags: ,

Leave a Reply





Donate

If you found this article useful and would like to see more like it this please consider making a donation.

Sponsors