Home
Sign Up
Sign In
V2EX
›
PHP
PHP PDO lastinsertId 有什么要求?
youla
·
Dec 16, 2020
· 2279 views
This topic created in 2152 days ago, the information mentioned may be changed or developed.
目前是(MySQL)bigint 的随机 id,insert 成功返回 0,之前用 int 自增 id 正常。
insert
PDO
bigint
MySQL
8 replies
zarte
Dec 16, 2020
1
百度 MySQL lastinsertId
youla
OP
Dec 16, 2020
2
@
zarte
别傻了,我肯定是百度过才来提问的。
youla
OP
Dec 16, 2020
3
已百度,已 Bing 、Yandex,跪求大佬指教!
dzdh
Dec 16, 2020
4
@
youla
https://github.com/php/php-src/blob/master/ext/pdo_mysql/mysql_driver.c#L289
youla
OP
Dec 16, 2020
5
@
dzdh
谢谢,可惜什么也木有看懂~
youla
OP
Dec 16, 2020
6
@
dzdh
是长度原因么
dzdh
Dec 16, 2020
7
只返回自增的。如果你不是自增的,那这个值不管用
youla
OP
Dec 16, 2020
8
@
dzdh
噢,谢谢,有点小扎心!
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
847 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 25ms ·
UTC 23:39
·
PVG 07:39
·
LAX 15:39
·
JFK 18:39
♥ Do have faith in what you're doing.
❯