Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Sunday, October 18, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  Str replace that does not work

phpMyEdit General     Str replace that does not work
Post new topic   Reply to topic    
 
Topshed9     Joined: 14 Jan 2008   Posts: 34  
Post Posted: 2012-04-07 14:19
Back to top  Reply with quote     

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

Code:

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     Joined: 10 Feb 2003   Posts: 1013   Location: Denver, Colorado (USA)
Post Posted: 2012-04-07 15:16
Back to top  Reply with quote     

Your syntax is incorrect.
http://dev.mysql.com/doc/refman/5.0/en/update.html

Back up your table before attempting to run:

Code:
UPDATE `lms` SET `cut` = REPLACE('cut' , 'Co.,Troon' , 'Co.Troon');


 
Topshed9     Joined: 14 Jan 2008   Posts: 34  
Post Posted: 2012-04-07 15:47
Back to top  Reply with quote     

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

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy