开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜