Bạn phải yêu cầu lastInsertId()
trước khi bạn thực hiện một transaction
Hãy thử
$this->dbh->beginTransaction();
// $sql query ran
echo $this->dbh->lastInsertId();
$this->dbh->commit();
Bạn phải yêu cầu lastInsertId()
trước khi bạn thực hiện một transaction
Hãy thử
$this->dbh->beginTransaction();
// $sql query ran
echo $this->dbh->lastInsertId();
$this->dbh->commit();