Using Prepared Statement, how I return the id of the inserted row?

After calling the execute() method on the Prepared Statement, the id of the insert row will be in the insert_id attribute.

$pstm->execute();
$pstm->insert_id;

Leave a Comment