Orionsbelter Posted May 24, 2011 Share Posted May 24, 2011 i'm struggling to find a way to take a text field from a database and delete a certain word from the record and then to update it again. for example if the text field was "hello tester please delete me tester, tester tester" i wished to delete all the words tester then update the text field to the new record. how could i do this? thanks for reading Quote Link to comment https://forums.phpfreaks.com/topic/237349-deleting-a-certain-word-form-text-field-in-mysql-database/ Share on other sites More sharing options...
Pikachu2000 Posted May 24, 2011 Share Posted May 24, 2011 MySQL's REPLACE() function is probably going to be your best option. If I were you, I'd backup the table first, or at least test it on a development database before letting it run on production data. Quote Link to comment https://forums.phpfreaks.com/topic/237349-deleting-a-certain-word-form-text-field-in-mysql-database/#findComment-1219652 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.