Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

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

   1  <?php
   2  
   3  /**
   4   * Provided by Ned Andre to support sqlsrv library
   5   */
   6  class ADODB_pdo_sqlsrv extends ADODB_pdo
   7  {
   8  
   9  	 var $hasTop = 'top';
  10  	 var $sysDate = 'convert(datetime,convert(char,GetDate(),102),102)';
  11  	 var $sysTimeStamp = 'GetDate()';
  12  
  13  	function _init(ADODB_pdo $parentDriver)
  14  	 {
  15  	 	 $parentDriver->hasTransactions = true;
  16  	 	 $parentDriver->_bindInputArray = true;
  17  	 	 $parentDriver->hasInsertID = true;
  18  	 	 $parentDriver->fmtTimeStamp = "'Y-m-d H:i:s'";
  19  	 	 $parentDriver->fmtDate = "'Y-m-d'";
  20  	 }
  21  
  22  	function BeginTrans()
  23  	 {
  24  	 	 $returnval = parent::BeginTrans();
  25  	 	 return $returnval;
  26  	 }
  27  
  28  	function MetaColumns($table, $normalize = true)
  29  	 {
  30  	 	 return false;
  31  	 }
  32  
  33  	function MetaTables($ttype = false, $showSchema = false, $mask = false)
  34  	 {
  35  	 	 return false;
  36  	 }
  37  
  38  	function SelectLimit($sql, $nrows = -1, $offset = -1, $inputarr = false, $secs2cache = 0)
  39  	 {
  40  	 	 $ret = ADOConnection::SelectLimit($sql, $nrows, $offset, $inputarr, $secs2cache);
  41  	 	 return $ret;
  42  	 }
  43  
  44  	function ServerInfo()
  45  	 {
  46  	 	 return ADOConnection::ServerInfo();
  47  	 }
  48  
  49  }