S E R V E R   S I D E
View current page
...more recent posts

I feel a little stupid about this one, but to be fair, you can't know everything. In MySQL you can 'update' part of a field (like search and replace) with the 'replace' function:

update [table_name] set [field_name] = replace([field_name], '[string_to_find]', '[string_to_replace]');

I've always just written a little program to select all records and then loop through and do the replace in PHP. This is obviously much easier. Google is my friend.
- jim 12-21-2008 8:02 pm [link] [1 ref] [add a comment]

older posts...