Jump to content

deleting a certain word form text field in mysql database


Orionsbelter

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

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