Category: MySQL
-
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: 73 1. Delete the controller \API\Controllers\SiteController.php, delete the model \api\models\contactform.php, \api\models\loginform.php, \api\models\PasswordResetRequ estform.php, \api\models\resetpasswordform.php, \api\models\signupform.php, delete the directory (view related) \api\views, \api\assets, \api\web\css 2. Delete the relevant files of the test (unit test, functional test, acceptance test), delete \api\tests\acceptance\homecest.php, delete \API\Tests\Functional\AboutCest.php, \API\Tests\Functional\ContactCest.php, \API\Tests\Functio NAL\HOMECEST.php, \API\Tests\Functional\logincest.php, \api\tests\functional\signupcest.php, delete \API\Tests\Unit\Models\ContactFormTest.php, \API\Tests\Unit\Models\PasswordResetRequestFormTest .php, \api\tests\unit\models\resetpasswordformtest.php, \api\tests\unit\models\signupformtest.php 3. Run all the sample tests,…
-
Post Views: 13 1. The multi-tenant system contains multiple tenants, and each tenant has its own database configuration information. The existing requirement is to connect the database based on the response host name, user name and password, as shown in Figure 1. 2. Now it is configured as an application component, \common\config\base.php, as shown in Figure 2 3. Open dubug,…
-
Post Views: 13 1. Edit \app\config\core.php, configure::write(debug, 2), as shown in Figure 1 2. Edit \App\View\Layouts\Base.ctp, <?php echo $this->element(sql_dump); ?>, as shown in Figure 2 3. After the GET request, print out the SQL statement that has been executed in the view, as shown in Figure 3 4. If it is a POST request, after the final execution is successful,…
-
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…