framework/db/schema/CDbCommandBuilder.php
public function getLastInsertID($table)
	{
		$this->ensureTable($table);
		if($table->sequenceName!==null)
			return $this->_connection->getLastInsertID($table->sequenceName);
		else
			return null;
	}
public function getLastInsertID($table)
	{
		$this->ensureTable($table);
		if($table->sequenceName!==null)
			return $this->_connection->getLastInsertID($table->sequenceName);
		else
			return null;
	}
public function getLastInsertID ( $ table ) { $ this -> ensureTable ( $ table ) ; if ( $ table -> sequenceName !== null ) return $ this -> _connection -> getLastInsertID ( $ table -> sequenceName ) ; else return null ; }
Returns the last insertion ID for the specified table.
@param mixed $table the table schema ({@link CDbTableSchema}) or the table name (string).
@return mixed last insertion id. Null is returned if no sequence name.
Returns the last insertion ID for the specified table .