The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 16, 2019, 10:07:58 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Search and Replace - MySQL  (Read 2444 times)
jsp123
Rookie
**
Offline Offline

Posts: 20


View Profile
« on: November 06, 2007, 08:42:37 PM »

mysql> update table_name set table_field = replace(table_field,'replace_that','with_this');

This will save me from writing a php script when I want to do this again.  Unless I need a regex...
Logged

No links in signatures please
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #1 on: November 06, 2007, 09:20:07 PM »

How funny ... that's why we have a code repository here, so that I can keep stuff I don't want to forget ever again.
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!