Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 310 and 311] [Versions 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403] [Versions 39 and 311]

   1  <?php
   2  
   3  
   4  /*
   5  @version   v5.21.0  2021-02-27
   6  @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
   7  @copyright (c) 2014      Damien Regad, Mark Newnham and the ADOdb community
   8    Released under both BSD license and Lesser GPL library license.
   9    Whenever there is any discrepancy between the two licenses,
  10    the BSD license will take precedence.
  11    Set tabs to 8.
  12  
  13  */
  14  
  15  class ADODB_pdo_mssql extends ADODB_pdo {
  16  
  17  	 var $hasTop = 'top';
  18  	 var $sysDate = 'convert(datetime,convert(char,GetDate(),102),102)';
  19  	 var $sysTimeStamp = 'GetDate()';
  20  
  21  
  22  	function _init($parentDriver)
  23  	 {
  24  
  25  	 	 $parentDriver->hasTransactions = false; ## <<< BUG IN PDO mssql driver
  26  	 	 $parentDriver->_bindInputArray = false;
  27  	 	 $parentDriver->hasInsertID = true;
  28  	 }
  29  
  30  	function ServerInfo()
  31  	 {
  32  	 	 return ADOConnection::ServerInfo();
  33  	 }
  34  
  35  	function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0)
  36  	 {
  37  	 	 $ret = ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
  38  	 	 return $ret;
  39  	 }
  40  
  41  	function SetTransactionMode( $transaction_mode )
  42  	 {
  43  	 	 $this->_transmode  = $transaction_mode;
  44  	 	 if (empty($transaction_mode)) {
  45  	 	 	 $this->Execute('SET TRANSACTION ISOLATION LEVEL READ COMMITTED');
  46  	 	 	 return;
  47  	 	 }
  48  	 	 if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode;
  49  	 	 $this->Execute("SET TRANSACTION ".$transaction_mode);
  50  	 }
  51  
  52  	function MetaTables($ttype=false,$showSchema=false,$mask=false)
  53  	 {
  54  	 	 return false;
  55  	 }
  56  
  57  	function MetaColumns($table,$normalize=true)
  58  	 {
  59  	 	 return false;
  60  	 }
  61  
  62  }