]> git.mjollnir.org Git - moodle.git/commitdiff
Added MetaIndexes() support to the odbc_mssql driver. We need it NOW!
authorstronk7 <stronk7>
Mon, 9 Oct 2006 22:21:01 +0000 (22:21 +0000)
committerstronk7 <stronk7>
Mon, 9 Oct 2006 22:21:01 +0000 (22:21 +0000)
I've posted one comment about this in ADOdb forums:

http://phplens.com/lens/lensforum/msgs.php?id=15930

lib/adodb/drivers/adodb-odbc_mssql.inc.php

index 65e8beab52f8a1def58101ee549ed118b69c25bf..5aa8c52d81aa08da819fd18fbbb7b1e466c61f32 100644 (file)
@@ -19,6 +19,8 @@ if (!defined('_ADODB_ODBC_LAYER')) {
        include(ADODB_DIR."/drivers/adodb-odbc.inc.php");
 }
 
+include_once(ADODB_DIR."/drivers/adodb-mssql.inc.php"); //Include mssql driver to wrap some functions
+
  
 class  ADODB_odbc_mssql extends ADODB_odbc {   
        var $databaseType = 'odbc_mssql';
@@ -152,6 +154,12 @@ order by constraint_name, referenced_table_name, keyno";
                if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode;
                $this->Execute("SET TRANSACTION ".$transaction_mode);
        }
+
+    //Just wrap over mssql because this is one mssql odbc db
+    function &MetaIndexes($table,$primary=false)
+    {
+        return ADODB_mssql::MetaIndexes($table,$primary);
+    }
        
        // "Stein-Aksel Basma" <basma@accelero.no>
        // tested with MSSQL 2000
@@ -262,4 +270,4 @@ class  ADORecordSet_odbc_mssql extends ADORecordSet_odbc {
                return $this->ADORecordSet_odbc($id,$mode);
        }       
 }
-?>
\ No newline at end of file
+?>