开发者

How to you insert into MySQL database and returns its id in PHP PDO?

开发者 https://www.devze.com 2022-12-19 19:41 出处:网络
Is there a way to insert 开发者_如何学Gointo MySQL database using PHP PDO and return its id? Or I will just have to search fot its id after insertion? $pdo_object->lastInsertId();

Is there a way to insert 开发者_如何学Gointo MySQL database using PHP PDO and return its id? Or I will just have to search fot its id after insertion?


$pdo_object->lastInsertId();

See documentation


Perhaps you're looking for PDO::lastInsertID?

0

精彩评论

暂无评论...
验证码 换一张
取 消