Jump to content

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

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

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.