db\Schema getLastInsertID()

getLastInsertID() public method

Returns the ID of the last inserted row or sequence value.

See also http://www.php.net/manual/en/function.PDO-lastInsertId.php.

public string getLastInsertID ( $sequenceName = '' )
$sequenceName string

Name of the sequence object (required by some DBMS)

return string

The row ID of the last row inserted, or the last value retrieved from the sequence object

throws yii\base\InvalidCallException

if the DB connection is not active

doc_Yii
2016-10-30 16:59:39
Comments
Leave a Comment

Please login to continue.