The database has an order table with a row of data order_id1555 (auto-incrementing primary key) and a tag field order_mark2 to execute the statement. use the mysql client tool QueryOK, 0 rowsaffected (0.00sec) Rowsmatched: 1 Changed: 0 Warnings: 0 use NavicatforMySQL tool to return [SQL] updatet_o... mysqlmybatis
The database has an order table.
There is a data row order_id = 1555 (auto-incrementing primary key), there is a tag field order_mark = 2
Execute the statement update t_order set order_mark = 2 where order_id = 1555.
Use the client tool provided by mysql
Query OK, 0 rows affected (0.00 sec)
Rows matched: 1 Changed: 0 Warnings: 0
Returned by using Navicat for MySQL
[SQL] updatt_order set order_mark = 2 where order_id = 1555
Affected rows: 0
Time: 0.002 s
Use the datastudio tool to return
1 record (s) affected
In the project
Project source code:
Int I = orderDAO. updateOrderMark (orderId, ORDER_MARK.CHEAT.ordinal ());
If (I = 1 ){
Int userId = order. getDriverId ();
The returned I = 1;
Debug prints the executed SQL
Explain why the number of affected rows returned is 1, not 0.