This question already has an answer here:
I have a PDO connection where I am inserting a new ROW in the databse:
$sql = UPDATE invoices SET ..."
Or
$sql = INSERT INTO invoices ..."
Then:
$stmt = self::getPDOConnection(self::DEFAULT_CONNECTION_NAME)->prepare($this->sql);
$stmt->execute($this->values);
And I would like to get the id of the updated, inserted element.
Thank you.
</div>