xPDO.lastInsertId
Last updated not available | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$185 per month—let's make that $500!
Learn morexPDO::lastInsertId¶
Returns the ID of the last row inserted into the database by the current connection, or false if no insert has occurred. For tables with a sequence, the sequence name may be passed as an argument.
Syntax¶
string|boolean lastInsertId ([string $name = null])
Example¶
$id = $xpdo->lastInsertId();
See Also¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$185 per month—let's make that $500!
Learn more










