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
https://forums.phpfreaks.com/topic/260491-replace-update-a-typo/
Share on other sites

  Quote

28 pages to sort thru

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

  Quote
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...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.