Commits

Alex Bilbie  committed 2b999f9

Think I've finished converting mssql commands to sqlsrv where appropriate

  • Participants
  • Parent commits d9afc32

Comments (0)

Files changed (2)

File system/database/drivers/sqlsrv/sqlsrv_driver.php

 	 */
 	function db_select()
 	{
-		// Note: The brackets are required in the event that the DB name
-		// contains reserved characters
-		return @mssql_select_db('['.$this->database.']', $this->conn_id);
+		// not implemented in sqlsrv
 	}
 
 	// --------------------------------------------------------------------

File system/database/drivers/sqlsrv/sqlsrv_result.php

 	 */
 	function num_rows()
 	{
-		return @mssql_num_rows($this->result_id);
+		return @sqlsrv_num_rows($this->result_id);
 	}
 
 	// --------------------------------------------------------------------
 	 */
 	function num_fields()
 	{
-		return @mssql_num_fields($this->result_id);
+		return @sqlsrv_num_fields($this->result_id);
 	}
 
 	// --------------------------------------------------------------------
 	function list_fields()
 	{
 		$field_names = array();
-		while ($field = mssql_fetch_field($this->result_id))
+		while ($field = sqlsrv_get_field($this->result_id))
 		{
 			$field_names[] = $field->name;
 		}
 	function field_data()
 	{
 		$retval = array();
-		while ($field = mssql_fetch_field($this->result_id))
+		while ($field = sqlsrv_get_field($this->result_id))
 		{
 			$F				= new stdClass();
 			$F->name		= $field->name;
 	{
 		if (is_resource($this->result_id))
 		{
-			mssql_free_result($this->result_id);
+			sqlsrv_free_stmt($this->result_id);
 			$this->result_id = FALSE;
 		}
 	}
 	 */
 	function _data_seek($n = 0)
 	{
-		return mssql_data_seek($this->result_id, $n);
+		// Not implemented
 	}
 
 	// --------------------------------------------------------------------
 	 */
 	function _fetch_assoc()
 	{
-		return mssql_fetch_assoc($this->result_id);
+		return sqlsrv_fetch_array($this->result_id, SQLSRV_FETCH_ASSOC);
 	}
 
 	// --------------------------------------------------------------------
 	 */
 	function _fetch_object()
 	{
-		return mssql_fetch_object($this->result_id);
+		return sqlsrv_fetch_object($this->result_id);
 	}
 
 }