breadcom Posted November 5, 2009 Share Posted November 5, 2009 what is a simple find & replace query if I want to replace every instance of A B C within a table or field(s) with D E F? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/180431-find-replace/ Share on other sites More sharing options...
gevensen Posted November 5, 2009 Share Posted November 5, 2009 for example UPDATE `table` SET `a` = 'ONE' WHERE `b` = 'TWO' Quote Link to comment https://forums.phpfreaks.com/topic/180431-find-replace/#findComment-951899 Share on other sites More sharing options...
breadcom Posted November 5, 2009 Author Share Posted November 5, 2009 Sorry does `a` and `b` represent the field? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/180431-find-replace/#findComment-951918 Share on other sites More sharing options...
fenway Posted November 18, 2009 Share Posted November 18, 2009 You'll need the REPLACE() function for that... but be careful with word boundaries and such. Quote Link to comment https://forums.phpfreaks.com/topic/180431-find-replace/#findComment-960094 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.