mysql - replace string inside the table sql -
I have a problem about replacing the string in mysql table with some requirement. You can view my current table:
+ ---- + ------------------------ + | ID | Data | + ---- + ------------------------ + | 1 | [Lesson 1] MyText 1 [/ lesson 1] | | | [Text2] MyText 2 [/ Lesson 2] | | | [Lesson 3] MyText 3 [/ Lesson 3] | | | [Text4] mytext4 [/ text4] | | + ---- + ------------------------ + then change me to The problem is: [ 3] [text3] mytext3 [/ text3] [text3] mytext5 [/ text3] and the problem is:
< Li> How can I change the content between [textX] and [/ textX]? Any ideas?
Like to search for hit, then change to change:
mytable set data = (data, 'mytext3', 'mytext5'), where '[text%] mytext 3 [/ text%]' data such as
Comments
Post a Comment