Category: Web Application Development
-
Post Views: 17 1. In Spatie\QueryBuilder , the request parameter contains “,” error: sqlstate[HY093]: Invalid parameter number: number of bound variables not match number of tokens (SQL: select count(*) as aggregate from `table` where `table`.`Shipping_type` = 2 and `Shipping_at_gmt` >= 2024-05-21 08:54:14 and `Shipping_at_gmt` <= 2024-08-21 08:54:14 and `table`.`Shipping_error_message in (AAA)). as shown in Figure 1 2. When the request…
-
Post Views: 19 1. pnpm : The file cannot be loaded c:\users\thinkpad\appdata\roaming\npm\pnpm.ps1, because running scripts are prohibited on this system. as shown in Figure 1 2. Reference: about_execution_policies . Instead of executing in the terminal, it is executed in the command prompt, and it is found that the execution is successful. as shown in Figure 2
-
Post Views: 14 1. In Laravel 9, an error is reported when querying a chunkById block: sqlstate[23000]: Integrity Constraint Violation: 1052 ColumnIDin where Clause is ambigous. as shown in Figure 1 2. The code is implemented as follows 3. After adding the column parameter of chunkbyid, an error is reported: The chunkbyid operation was borne the[orders.id]Column is not present in…
-
Post Views: 15 1. The initial response structure is as follows: as shown in Figure 1 2. Since paging is not required, the front end wants to remove the package data key of the outermost resources, and set the “data” wrapper to null. Modify the resource collection class as follows 3. The result is as expected, and the interface…
-
Post Views: 17 1. Verify the fields that conform to the MySQL field type Decimal(8,2) in Lavavel 9. as shown in Figure 1 2. The final realization is as follows 3. Try respectively: -4 (fail), 0 (success), 5 (success), 999999.99 (success), 999999.990 (success), 999999 .991 (failed), 9999990.99 (fail), 0.09 (success), 0.009 (fail), 0.0000001 (failed), in line with expectations. as shown…
-
Post Views: 16 1. Execute database migration in Laravel 9, modify the field name, and then modify its properties, and report an error: There is no column with name inbounded_quantity on table return_order_items. As shown in Figure 1 2. The code is implemented as follows 3. Decide to try to modify its properties first, and then modify the field name.…
-
Post Views: 17 1. Execute the database migration error in Laravel 9: sqlstate[HY000]: General error: 1366 Incorrect decimal value:0for columnat row -1. as shown in Figure 1 2. Copy the error-reported sql to Navicat for MySQL to execute, but still report the error: 1366 – Incorrect decimal value:0for columnat row -1. as shown in Figure 2 3. Check the code…
-
Post Views: 18 1. In Laravel 9, the queue task timeout. Decided to try to verify, the implementation in the task class is as follows. Finally found that it was not in effect on Windows systems. The reason is that the PCNTL PHP extension must be installed to specify the task timeout. But this extension is not available on the…
-
Post Views: 19 1. In Laravel 9, what is the default value of the maximum number of attempts for the queue task? Decided to try to verify, the implementation in the task class is as follows 2. The print log is as follows 3. The maximum number of attempts to define the task class itself is 1, and the implementation…