Jump to content


Photo

search and replace?


  • Please log in to reply
6 replies to this topic

#1 Crusader

Crusader
  • Members
  • PipPipPip
  • Advanced Member
  • 74 posts
  • LocationCanada

Posted 22 September 2006 - 11:52 PM

Is there an easy way to do a "search and replace" in MySql? The data I need to alter is stored in a longtext/possibly blob. I basically need to replace all instances of one word. Any ideas?

Thanks.

#2 Lee

Lee
  • Members
  • PipPipPip
  • Advanced Member
  • 75 posts

Posted 24 September 2006 - 12:00 AM

I have an idea that you're going to be up all night  :-[

#3 Crusader

Crusader
  • Members
  • PipPipPip
  • Advanced Member
  • 74 posts
  • LocationCanada

Posted 24 September 2006 - 09:22 AM

:(

There was a big problem with the ' character showing up as a bunch of gibberish... I don't think I can look through 200 news posts in time.

#4 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 25 September 2006 - 03:52 AM

Is there an actual question here?
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#5 Crusader

Crusader
  • Members
  • PipPipPip
  • Advanced Member
  • 74 posts
  • LocationCanada

Posted 25 September 2006 - 04:09 AM

Is there an actual question here?


"Is there an easy way to do a "search and replace" in MySql? The data I need to alter is stored in a longtext/possibly blob. I basically need to replace all instances of one word. Any ideas?"

#6 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 25 September 2006 - 04:12 AM

Well, there is a REPLACE() function, so yes.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#7 Crusader

Crusader
  • Members
  • PipPipPip
  • Advanced Member
  • 74 posts
  • LocationCanada

Posted 25 September 2006 - 04:20 AM

Thanks. Never knew that existed.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users