I encountered a MySQL Field update problem at work.
The value of a tariffurl in the custom table is as follows:
Uploadfiles ariff2007031172720306698.jpg and uploadfiles ariff2007031172720306690.jpg; uploadfiles ariff2007031172720306691.jpg
To change to uploadfiles/tariff/200703/1172720306698 .jpg and uploadfiles/tariff/200703/1172720306690 .jpg; uploadfiles/tariff200703/1172720306691.jpg
The substring and cancat functions can be used in combination. The steps are as follows:
1. Update custom set tariffurl = Concat ('uploadfiles/tariff/200703/', substring (tariffurl, 24) where tariffurl like 'uploadfiles ariff200703 %'
2. Update custom set tariffurl = Concat (substring (tariffurl, 1, 55), '/tariff/200703/', substring (tariffurl, 68 ))
Where tariffurl like 'uploadfiles/tariff/200703/% 'and tariffurl like' %; uploadfiles %'
Substring (filed, m): the string that intercepts the filed field from the M character to the end;
Substring (filed, m, n): truncates a string whose length starts from the nth character of the filed field;
Cancat (string1, sting2 ,......) : Set string1, string2 ,...... String.