A minor improvement to insert_id()
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php
index 22ed047..4d29920 100644
--- a/system/database/drivers/mssql/mssql_driver.php
+++ b/system/database/drivers/mssql/mssql_driver.php
@@ -280,13 +280,13 @@
 	*/
 	public function insert_id()
 	{
-		$sql = (self::_parse_major_version($this->version()) > 7)
+		$query = (self::_parse_major_version($this->version()) > 7)
 			? 'SELECT SCOPE_IDENTITY() AS last_id'
 			: 'SELECT @@IDENTITY AS last_id';
 
-		$query = $this->query($sql);
-		$row = $query->row();
-		return $row->last_id;
+		$query = $this->query($query);
+		$query = $query->row();
+		return $query->last_id;
 	}
 
 	// --------------------------------------------------------------------