/** * Returns the ID of the last inserted row, or the last value from a sequence object, * depending on the underlying driver. * * Note: This method may not return a meaningful or consistent result across different drivers, * because the underlying database may not even support the notion of AUTO_INCREMENT/IDENTITY * columns or sequences. * * @param string|null $seqName Name of the sequence object from which the ID should be returned. * * @return string A string representation of the last inserted ID. */ public function lastInsertId($seqName = null) { $this->connect(); return $this->_conn->lastInsertId($seqName); }
/** * @return string */ public function lastInsertId() { return $this->conn->lastInsertId($this->seqName); }