Cleanup of stray spaces and tabs
diff --git a/system/database/drivers/mssql/mssql_driver.php b/system/database/drivers/mssql/mssql_driver.php
index 40900e8..63f9e9c 100644
--- a/system/database/drivers/mssql/mssql_driver.php
+++ b/system/database/drivers/mssql/mssql_driver.php
@@ -31,14 +31,14 @@
 class CI_DB_mssql_driver extends CI_DB {
 
 	var $dbdriver = 'mssql';
-	
+
 	// The character used for escaping
 	var $_escape_char = '';
 
 	// clause and character used for LIKE escape sequences
 	var $_like_escape_str = " ESCAPE '%s' ";
 	var $_like_escape_chr = '!';
-	
+
 	/**
 	 * The syntax to count rows is slightly different across different
 	 * database engines, so this string appears in each driver and is
@@ -52,7 +52,7 @@
 	 *
 	 * @access	private called by the base class
 	 * @return	resource
-	 */	
+	 */
 	function db_connect()
 	{
 		if ($this->port != '')
@@ -62,7 +62,7 @@
 
 		return @mssql_connect($this->hostname, $this->username, $this->password);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -70,7 +70,7 @@
 	 *
 	 * @access	private called by the base class
 	 * @return	resource
-	 */	
+	 */
 	function db_pconnect()
 	{
 		if ($this->port != '')
@@ -80,9 +80,9 @@
 
 		return @mssql_pconnect($this->hostname, $this->username, $this->password);
 	}
-	
+
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Reconnect
 	 *
@@ -98,13 +98,13 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Select the database
 	 *
 	 * @access	private called by the base class
 	 * @return	resource
-	 */	
+	 */
 	function db_select()
 	{
 		// Note: The brackets are required in the event that the DB name
@@ -113,7 +113,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Set client character set
 	 *
@@ -129,20 +129,20 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Execute the query
 	 *
 	 * @access	private called by the base class
 	 * @param	string	an SQL query
 	 * @return	resource
-	 */	
+	 */
 	function _execute($sql)
 	{
 		$sql = $this->_prep_query($sql);
 		return @mssql_query($sql, $this->conn_id);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -153,7 +153,7 @@
 	 * @access	private called by execute()
 	 * @param	string	an SQL query
 	 * @return	string
-	 */	
+	 */
 	function _prep_query($sql)
 	{
 		return $sql;
@@ -165,15 +165,15 @@
 	 * Begin Transaction
 	 *
 	 * @access	public
-	 * @return	bool		
-	 */	
+	 * @return	bool
+	 */
 	function trans_begin($test_mode = FALSE)
 	{
 		if ( ! $this->trans_enabled)
 		{
 			return TRUE;
 		}
-		
+
 		// When transactions are nested we only begin/commit/rollback the outermost ones
 		if ($this->_trans_depth > 0)
 		{
@@ -195,8 +195,8 @@
 	 * Commit Transaction
 	 *
 	 * @access	public
-	 * @return	bool		
-	 */	
+	 * @return	bool
+	 */
 	function trans_commit()
 	{
 		if ( ! $this->trans_enabled)
@@ -220,8 +220,8 @@
 	 * Rollback Transaction
 	 *
 	 * @access	public
-	 * @return	bool		
-	 */	
+	 * @return	bool
+	 */
 	function trans_rollback()
 	{
 		if ( ! $this->trans_enabled)
@@ -238,7 +238,7 @@
 		$this->simple_query('ROLLBACK TRAN');
 		return TRUE;
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -254,16 +254,16 @@
 		if (is_array($str))
 		{
 			foreach($str as $key => $val)
-	   		{
+			{
 				$str[$key] = $this->escape_str($val, $like);
-	   		}
-   		
-	   		return $str;
-	   	}
-		
+			}
+
+			return $str;
+		}
+
 		// Escape single quotes
 		$str = str_replace("'", "''", remove_invisible_characters($str));
-		
+
 		// escape LIKE condition wildcards
 		if ($like === TRUE)
 		{
@@ -271,10 +271,10 @@
 								array($this->_like_escape_chr.'%', $this->_like_escape_chr.'_', $this->_like_escape_chr.$this->_like_escape_chr),
 								$str);
 		}
-		
+
 		return $str;
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -287,7 +287,7 @@
 	{
 		return @mssql_rows_affected($this->conn_id);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -312,7 +312,7 @@
 	/**
 	* Parse major version
 	*
-	* Grabs the major version number from the 
+	* Grabs the major version number from the
 	* database server version string passed in.
 	*
 	* @access private
@@ -382,14 +382,14 @@
 	function _list_tables($prefix_limit = FALSE)
 	{
 		$sql = "SELECT name FROM sysobjects WHERE type = 'U' ORDER BY name";
-		
+
 		// for future compatibility
 		if ($prefix_limit !== FALSE AND $this->dbprefix != '')
 		{
 			//$sql .= " LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_chr);
 			return FALSE; // not currently supported
 		}
-		
+
 		return $sql;
 	}
 
@@ -406,7 +406,7 @@
 	 */
 	function _list_columns($table = '')
 	{
-		return "SELECT * FROM INFORMATION_SCHEMA.Columns WHERE TABLE_NAME = '".$table."'";	
+		return "SELECT * FROM INFORMATION_SCHEMA.Columns WHERE TABLE_NAME = '".$table."'";
 	}
 
 	// --------------------------------------------------------------------
@@ -422,7 +422,7 @@
 	 */
 	function _field_data($table)
 	{
-		return "SELECT TOP 1 * FROM ".$table;	
+		return "SELECT TOP 1 * FROM ".$table;
 	}
 
 	// --------------------------------------------------------------------
@@ -437,7 +437,7 @@
 	{
 		return mssql_get_last_message();
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -474,26 +474,26 @@
 		{
 			if (strpos($item, '.'.$id) !== FALSE)
 			{
-				$str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item);  
-				
+				$str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item);
+
 				// remove duplicates if the user already included the escape
 				return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str);
-			}		
+			}
 		}
 
 		if (strpos($item, '.') !== FALSE)
 		{
-			$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char;			
+			$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char;
 		}
 		else
 		{
 			$str = $this->_escape_char.$item.$this->_escape_char;
 		}
-		
+
 		// remove duplicates if the user already included the escape
 		return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -512,12 +512,12 @@
 		{
 			$tables = array($tables);
 		}
-		
+
 		return implode(', ', $tables);
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Insert statement
 	 *
@@ -530,10 +530,10 @@
 	 * @return	string
 	 */
 	function _insert($table, $keys, $values)
-	{	
+	{
 		return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -555,21 +555,21 @@
 		{
 			$valstr[] = $key." = ".$val;
 		}
-		
+
 		$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
-		
+
 		$orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
-	
+
 		$sql = "UPDATE ".$table." SET ".implode(', ', $valstr);
 
 		$sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : '';
 
 		$sql .= $orderby.$limit;
-		
+
 		return $sql;
 	}
 
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -582,12 +582,12 @@
 	 * @access	public
 	 * @param	string	the table name
 	 * @return	string
-	 */	
+	 */
 	function _truncate($table)
 	{
 		return "TRUNCATE ".$table;
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -600,7 +600,7 @@
 	 * @param	array	the where clause
 	 * @param	string	the limit clause
 	 * @return	string
-	 */	
+	 */
 	function _delete($table, $where = array(), $like = array(), $limit = FALSE)
 	{
 		$conditions = '';
@@ -618,7 +618,7 @@
 		}
 
 		$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
-	
+
 		return "DELETE FROM ".$table.$conditions.$limit;
 	}
 
@@ -638,8 +638,8 @@
 	function _limit($sql, $limit, $offset)
 	{
 		$i = $limit + $offset;
-	
-		return preg_replace('/(^\SELECT (DISTINCT)?)/i','\\1 TOP '.$i.' ', $sql);		
+
+		return preg_replace('/(^\SELECT (DISTINCT)?)/i','\\1 TOP '.$i.' ', $sql);
 	}
 
 	// --------------------------------------------------------------------
@@ -654,7 +654,7 @@
 	function _close($conn_id)
 	{
 		@mssql_close($conn_id);
-	}	
+	}
 
 }
 
diff --git a/system/database/drivers/mssql/mssql_forge.php b/system/database/drivers/mssql/mssql_forge.php
index f6a1781..5aa4406 100644
--- a/system/database/drivers/mssql/mssql_forge.php
+++ b/system/database/drivers/mssql/mssql_forge.php
@@ -79,12 +79,12 @@
 	function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists)
 	{
 		$sql = 'CREATE TABLE ';
-		
+
 		if ($if_not_exists === TRUE)
 		{
 			$sql .= 'IF NOT EXISTS ';
 		}
-		
+
 		$sql .= $this->db->_escape_identifiers($table)." (";
 		$current_field_count = 0;
 
@@ -100,41 +100,41 @@
 			else
 			{
 				$attributes = array_change_key_case($attributes, CASE_UPPER);
-				
+
 				$sql .= "\n\t".$this->db->_protect_identifiers($field);
-				
+
 				$sql .=  ' '.$attributes['TYPE'];
-	
+
 				if (array_key_exists('CONSTRAINT', $attributes))
 				{
 					$sql .= '('.$attributes['CONSTRAINT'].')';
 				}
-	
+
 				if (array_key_exists('UNSIGNED', $attributes) && $attributes['UNSIGNED'] === TRUE)
 				{
 					$sql .= ' UNSIGNED';
 				}
-	
+
 				if (array_key_exists('DEFAULT', $attributes))
 				{
 					$sql .= ' DEFAULT \''.$attributes['DEFAULT'].'\'';
 				}
-	
+
 				if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE)
 				{
 					$sql .= ' NULL';
 				}
 				else
 				{
-					$sql .= ' NOT NULL';			
+					$sql .= ' NOT NULL';
 				}
-	
+
 				if (array_key_exists('AUTO_INCREMENT', $attributes) && $attributes['AUTO_INCREMENT'] === TRUE)
 				{
 					$sql .= ' AUTO_INCREMENT';
 				}
 			}
-			
+
 			// don't add a comma on the end of the last field
 			if (++$current_field_count < count($fields))
 			{
@@ -147,24 +147,24 @@
 			$primary_keys = $this->db->_protect_identifiers($primary_keys);
 			$sql .= ",\n\tPRIMARY KEY (" . implode(', ', $primary_keys) . ")";
 		}
-		
+
 		if (is_array($keys) && count($keys) > 0)
 		{
 			foreach ($keys as $key)
 			{
 				if (is_array($key))
 				{
-					$key = $this->db->_protect_identifiers($key);	
+					$key = $this->db->_protect_identifiers($key);
 				}
 				else
 				{
 					$key = array($this->db->_protect_identifiers($key));
 				}
-				
+
 				$sql .= ",\n\tFOREIGN KEY (" . implode(', ', $key) . ")";
 			}
 		}
-		
+
 		$sql .= "\n)";
 
 		return $sql;
@@ -218,9 +218,9 @@
 		{
 			$sql .= ' AFTER ' . $this->db->_protect_identifiers($after_field);
 		}
-		
+
 		return $sql;
-		
+
 	}
 
 	// --------------------------------------------------------------------
diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php
index e7b3380..09b1ec8 100644
--- a/system/database/drivers/mssql/mssql_result.php
+++ b/system/database/drivers/mssql/mssql_result.php
@@ -25,7 +25,7 @@
  * @link		http://codeigniter.com/user_guide/database/
  */
 class CI_DB_mssql_result extends CI_DB_result {
-	
+
 	/**
 	 * Number of rows in the result set
 	 *
@@ -36,7 +36,7 @@
 	{
 		return @mssql_num_rows($this->result_id);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -67,7 +67,7 @@
 		{
 			$field_names[] = $field->name;
 		}
-		
+
 		return $field_names;
 	}
 
@@ -85,17 +85,17 @@
 	{
 		$retval = array();
 		while ($field = mssql_fetch_field($this->result_id))
-		{	
-			$F 				= new stdClass();
-			$F->name 		= $field->name;
-			$F->type 		= $field->type;
+		{
+			$F				= new stdClass();
+			$F->name		= $field->name;
+			$F->type		= $field->type;
 			$F->max_length	= $field->max_length;
 			$F->primary_key = 0;
 			$F->default		= '';
-			
+
 			$retval[] = $F;
 		}
-		
+
 		return $retval;
 	}
 
@@ -105,7 +105,7 @@
 	 * Free the result
 	 *
 	 * @return	null
-	 */		
+	 */
 	function free_result()
 	{
 		if (is_resource($this->result_id))
@@ -131,7 +131,7 @@
 	{
 		return mssql_data_seek($this->result_id, $n);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -146,7 +146,7 @@
 	{
 		return mssql_fetch_assoc($this->result_id);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
diff --git a/system/database/drivers/mssql/mssql_utility.php b/system/database/drivers/mssql/mssql_utility.php
index 751be14..e58c7e0 100644
--- a/system/database/drivers/mssql/mssql_utility.php
+++ b/system/database/drivers/mssql/mssql_utility.php
@@ -52,7 +52,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Repair table query
 	 *