Tag: MySQL
-
Post Views: 54 1. In the development environment, the execution of the database migration command fails: 1071 Specified key was too long; Max key length is 767 bytes, as shown in Figure 17 2. Run sql in the database in the development environment, and report an error: #1071 – specific key was too long; max key length is 767 bytes,…
-
Post Views: 53 1. Use updateAll() to update the value of prev_status to the value of status, and update the value of status to 4, the table structure is shown in Figure 1 2. Based on the query builder, the code is as follows 3. However, it does not meet the expectations. The values of prev_status are updated with 0,…
-
Post Views: 15 1. In PHP 7.1 and Yii 2, AR activity records transactions, and the implementation of multiple models needs to be operated at the same time, as shown in Figure 1 2. Test whether the transaction is supported, and let the $this->save() operation fail, and let the $contentDetail->save() operation succeed, the response is as follows, as shown in…
-
Post Views: 14 1. Since too large SQL files cannot be imported in phpmyadmin, I decided to import them in mysql query browser, as shown in Figure 1 2. The SQL file size is: 186MB, as shown in Figure 2 3. Click the Execute button to execute the script, as shown in Figure 3 4. During the execution process, the…
-
Post Views: 43 1. When running the SQL file, an error is reported:[ERR]2013 – Lost Connection to MySQL Server During During Query, as shown in Figure 1 [错误]2013 – Loss of connection to mysql server during query 2. Open the directory C:\ProgramData\MySQL\MySQL Server 5.7, edit the my.ini file, as shown in Figure 2 3. Change max_allowed_packet=4m to max_allowed_packet=256m, as shown…
-
Post Views: 15 1. Define: Data Layer: Models are used to define data-related automatic verification and auto-completion and data access interfaces. Logic Layer: Logics is used to define data-related business logic. 2. Create a new logics directory in the common directory, which is used for the logical layer of the mysql model, as shown in Figure 1 3. Create a…
-
Post Views: 11 1. The final expectation result is: modify the avatar in the player table, its value is: /storage/web/app/player_avatar/gzhou/579365.jpg, where gzhou is the value of the current record field TEAM_CODE, 579365 is the value of the current record field code, as shown in Figure 1 2. First modify the avatar of a record, and its SQL statement is successfully…