What’s the most efficient way to cycle through all entries in a table and replace all instances of a string with another.
For instance, I’ve got some legacy bb code that I want to replace…
Replace: [img]/images/emoticons/happy.png[/img] or <img src="/images/emoticons/happy.png">
With: :)
The quickest way would be to let the database do all the work:
If your source or target strings contain quotes (or if you’re not writing them by hand), then use
connection.quote: