1. The final expected result is to modify the avatar in the player table, with its value being: /storage/web/app/player_avatar/GZHOU/579365.jpg, where GZHOU is the value of the current record’s team_code field and 579365 is the value of the current record’s code field, as shown in Figure 1

2. First, modify the avatar of a single record. The SQL statement executes successfully, as shown in Figure 2
UPDATE `kq_player` SET `avatar` = concat(‘/storage/web/app/player_avatar/’,`team_code`,’/’,`code`,’.jpg’) WHERE `code` = ‘389345’;

3. After refreshing, check the execution result. The avatar of the record with code 389345 has the value: /storage/web/app/player_avatar/GZHOU/389345.jpg. The modification is successful and meets expectations, as shown in Figure 3

4. Check the records before modifying all records; the avatar is empty, as shown in Figure 4

5. Prepare to modify the avatar of all records by removing the WHERE condition. The SQL statement executes successfully, as shown in Figure 5
UPDATE `kq_player` SET `avatar` = concat(‘/storage/web/app/player_avatar/’,`team_code`,’/’,`code`,’.jpg’);

6. Check the records after modifying all records; the avatar is no longer empty. The modification is successful and meets expectations, as shown in Figure 6

7. Search the avatar field to check whether it contains spaces, as shown in Figure 7

8. The SQL statement executes successfully, and some records indeed contain spaces, as shown in Figure 8
/storage/web/app/player_avatar/LIFAN /974218.jpg

9. Decide to first remove the spaces in the team_code field, then execute the SQL to modify the avatar field. The SQL statement executes successfully, as shown in Figure 9
UPDATE `kq_player` SET `team_code` = replace(`team_code`,’ ‘,”);
UPDATE `kq_player` SET `avatar` = concat(‘/storage/web/app/player_avatar/’,`team_code`,’/’,`code`,’.jpg’);

10. Search the avatar field to check whether it contains spaces; zero rows are returned, as shown in Figure 10

