qq_仰望星空_96
2018-08-11 16:43
同样啊 楼主我也是这个问题使用了AUTO 每次INSERT也都显示成功了但是LAST_INSERT_ID()返回的还是0
mysql> SELECT *FROM a1;
-> //
+-------+----------+
| us_id | username |
+-------+----------+
| 1 | A |
| 2 | B |
| 3 | C |
| 4 | TOM% |
| 5 | D |
+-------+----------+
5 rows in set (0.00 sec)
mysql> SELECT LAST_INSERT_ID()//
+------------------+
| LAST_INSERT_ID() |
+------------------+
| 0 |
+------------------+
1 row in set (0.00 sec)