Tag: SET
-
Post Views: 16 1. The current collection format is as follows 2. If you need to look up based on id, the firstwhere method returns the first element in the collection with a given key/value pair 3. Now you need to look up based on the two key-value pairs of name and email. The first method returns the first element…
-
Post Views: 16 1. In Laravel, when responding to 404 in the middleware, an error is reported: View[components.css]not found. as shown in Figure 1 2. Check the corresponding topic, confirm that the file /resources/views/view_object/components/css.blade.php exists. as shown in Figure 2 3. The same response of 404 code, error in the middleware: View[components.css]not found. Response 404 in the controller method. Print…
-
Post Views: 16 1. Execute SQL as follows 2. Error: 1093 – you canT specific target tablexx_themesfor update in from clause. as shown in Figure 1 3. Reference:https://dev.mysql.com/doc/refman/5.7/en/update.html, in MySQL, you cannot modify the same table used in the Select section. You can connect the table to itself, which will cause MySQL to treat the table as two different things,…
-
Post Views: 18 1. Reference URL:https://www.shuijingwanwq.com/2017/01/08/1505/, the process of realizing the locking mechanism of Redis under Yii2.0, its core is to use Redis SetNX. 2. Generally speaking, after the lock is successful, the corresponding business logic is executed, and then the lock is deleted. However, if the business logic is accidentally exited for some reason, resulting in a lock but…
-
Post Views: 20 1. At this stage, there is a new requirement, and it is necessary to do some initial data work for the product when deploying the product. Prepare the corresponding SQL file in advance. Since multiple SQL statements need to be executed, and subsequent SQL statements depend on the primary key ID generated by the previous SQL statement.…
-
Post Views: 18 1. Table: weibo_weibo_connect_web_app_user field: permission, ready to move to table: channel_app_source field in: Permission, and then delete the table: weibo_weibo_connect_web_app_user field: Permission, as shown in Figure 1 2. Table: Fields in channel_app_source: Permission, table: weibo_weibo_connect_web_app_user: CHANNEL_APP_SOURCE_ID Associated with the field: ID in CHANNEL_APP_SOURCE, as shown in Figure 2 3. SQL is as follows, update the table: fields…
-
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,…