public function lastInsertId($sequenceName = null)
    {
        if (isset($this->lastInsertedIds[$sequenceName])) {
            $lastInsertId = $this->lastInsertedIds[$sequenceName];
            unset($this->lastInsertedIds[$sequenceName]);

            return $lastInsertId;
        }

        return $this->connection->lastInsertId($sequenceName);
    }
public function lastInsertId($sequenceName = null)
    {
        if (isset($this->lastInsertedIds[$sequenceName])) {
            $lastInsertId = $this->lastInsertedIds[$sequenceName];
            unset($this->lastInsertedIds[$sequenceName]);

            return $lastInsertId;
        }

        return $this->connection->lastInsertId($sequenceName);
    }
public function lastInsertId ( $ sequenceName = null ) { if ( isset ( $ this -> lastInsertedIds [ $ sequenceName ] ) ) { $ lastInsertId = $ this -> lastInsertedIds [ $ sequenceName ] ; unset ( $ this -> lastInsertedIds [ $ sequenceName ] ) ; return $ lastInsertId ; } return $ this -> connection -> lastInsertId ( $ sequenceName ) ; }
Retrieve the last auto incremet or sequence id.

@param string $sequenceName

@return string
Retrieve the last auto incremet or sequence id .