yii\db\Schema::getLastInsertID PHP 메소드

getLastInsertID() 공개 메소드

Returns the ID of the last inserted row or sequence value.
또한 보기: http://www.php.net/manual/en/function.PDO-lastInsertId.php
public getLastInsertID ( string $sequenceName = '' ) : string
$sequenceName string name of the sequence object (required by some DBMS)
리턴 string the row ID of the last row inserted, or the last value retrieved from the sequence object
    public function getLastInsertID($sequenceName = '')
    {
        if ($this->db->isActive) {
            return $this->db->pdo->lastInsertId($sequenceName === '' ? null : $this->quoteTableName($sequenceName));
        } else {
            throw new InvalidCallException('DB Connection is not active.');
        }
    }