| Index
» Projekty
» phpMyEdit
» Fórum
» Str replace that does not work |
 |
Topshed9
Založený: 14.01.2008
Príspevky: 34
Zaslal: 2012-04-07 14:19
Návrat hore
Odpovedať s citátom
|
I have been using code to replace a Str in phpmyadmin fo some time but it now fails every time
I found the code in here in a reply from Doug
| Kód: |
SELECT `lms`
SET `cut` = REPLACE('cut' , `Co.,Troon` , 'Co.Troon' );
|
I am trying to remove the commer before Troon
Various advice is that REPLACE should only be used with SElECT is that the problem ??
any help most welcome
Topy
|
doug
Založený: 10.02.2003
Príspevky: 1013
Bydlisko: Denver, Colorado (USA)
Zaslal: 2012-04-07 15:16
Návrat hore
Odpovedať s citátom
|
Your syntax is incorrect.
http://dev.mysql.com/doc/refman/5.0/en/update.html
Back up your table before attempting to run:
| Kód: |
| UPDATE `lms` SET `cut` = REPLACE('cut' , 'Co.,Troon' , 'Co.Troon'); |
|
Topshed9
Založený: 14.01.2008
Príspevky: 34
Zaslal: 2012-04-07 15:47
Návrat hore
Odpovedať s citátom
|
Hi Doug, Glad I followed your reminder about backing up
The corrected code replaced the cut field to cut all 15556 of them
Gulp....
Regards Topy ...
|
|
Odoslať novú tému
Odpovedať na tému
|
|
|
|