Jump to content

Replace / update a Typo


Topshed

Recommended Posts

mySQL ver: 5.1.30

PHP  ver: 5.2.8

 

I have a typo in over 400 records and I want to fix it in phpmyadmin

The field is tinytext and the string I am trying to fix is 91 chars long

I am trying to fix a small section of the string

 

My efforts are a dismal failure  ie:

 

UPDATE lms  SET cut =  'Co.T'    WHERE cut = 'Co.,T'

 

Your help would be most welcome

 

Topshed

Link to comment
Share on other sites

28 pages to sort thru

Well that's funny. Because when I click that link I posted I arrive immediately at

REPLACE(str,from_str,to_str)

 

Returns the string str with all occurrences of the string from_str replaced by the string to_str. REPLACE() performs a case-sensitive match when searching for from_str.

 

mysql> SELECT REPLACE('www.mysql.com', 'w', 'Ww');
        -> 'WwWwWw.mysql.com'

This function is multi-byte safe.

Maybe your Internet isn't the same as my Internet...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.