Mysql> Select Id,avatar from tf_user;+----+--------------+| ID | Avatar |+----+--------------+| 1 | Avatar_1.png | | 2 | Avatar_6.png | | 3 | Avatar_1.png | | 4 | Avatar_5.png | | 5 | Avatar_5.png | | 6 | Avatar_4.png | | 7 | Avatar_6.png | | 8 | Avatar_3.png | | 9 | Avatar_4.png | | 10 | Avatar_1.png | | 11 | Avatar_5.png | | 12 | Avatar_1.png |+----+--------------+12 rows in Set (0.01 sec) mysql> Update tf_user Set avatar = concat ("Chongwu_", Avatar ); Here the "+" is the mathematical logic operation symbol; in PHP ".", the link string is also not possible; Query OK, affected (0.01 sec) rows Matched:12 changed:12 warnings:0mysq L> Select Id,avatar from tf_user;+----+----------------------+| ID | Avatar |+----+----------------------+| 1 | Chongwu_avatar_1.png | | 2 | Chongwu_avatar_6.png | | 3 | Chongwu_avatar_1.png | | 4 | Chongwu_avatar_5.png | | 5 | Chongwu_avatar_5.png | | 6 | Chongwu_avatar_4.png | | 7 | Chongwu_avatar_6.png | | 8 | Chongwu_avatar_3.png | | 9 | Chongwu_avatar_4.png | | 10 | Chongwu_avatar_1.png | | 11 | Chongwu_avatar_5.png | | 12 | Chongwu_avatar_1.png |+----+----------------------+12 rows in Set (0.00 sec)
Stitching strings in MySQL concat update