It might sound a bit convoluted, but the meaning is correct!
For example, the field content could be: [Hello, I'm your friend]
Now, I would like to replace the content preceding "[I am]" with an empty string.
That's the effect.
You can use MySQL string functions. SUBSTRING_INDEX() combine REPLACE() Implement using a function. Below is an example code:
UPDATE 表名 SET 字段名 = REPLACE(字段名, SUBSTRING_INDEX(字段名, '我是', 1), '')for instance:
UPDATE phome_ecms_news_data_1 SET newstext = REPLACE(newstext, SUBSTRING_INDEX(newstext, '我是一个很帅气的分割线', 1), '')