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   * @version   v5.21.0  2021-02-27
   4   * @copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
   5   * @copyright (c) 2014      Damien Regad, Mark Newnham and the ADOdb community
   6   * Released under both BSD license and Lesser GPL library license.
   7   * Whenever there is any discrepancy between the two licenses,
   8   * the BSD license will take precedence.
   9   *
  10   * Set tabs to 4 for best viewing.
  11   *
  12   * Latest version is available at https://adodb.org/
  13   *
  14   * Oracle 8.0.5 driver
  15  */
  16  
  17  // security - hide paths
  18  if (!defined('ADODB_DIR')) die();
  19  
  20  include_once(ADODB_DIR.'/drivers/adodb-oci8.inc.php');
  21  
  22  class ADODB_oci805 extends ADODB_oci8 {
  23  	 var $databaseType = "oci805";
  24  	 var $connectSID = true;
  25  
  26  	function SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0)
  27  	 {
  28  	 	 // seems that oracle only supports 1 hint comment in 8i
  29  	 	 if (strpos($sql,'/*+') !== false)
  30  	 	 	 $sql = str_replace('/*+ ','/*+FIRST_ROWS ',$sql);
  31  	 	 else
  32  	 	 	 $sql = preg_replace('/^[ \t\n]*select/i','SELECT /*+FIRST_ROWS*/',$sql);
  33  
  34  	 	 /*
  35  	 	 	 The following is only available from 8.1.5 because order by in inline views not
  36  	 	 	 available before then...
  37  	 	 	 http://www.jlcomp.demon.co.uk/faq/top_sql.html
  38  	 	 if ($nrows > 0) {
  39  	 	 	 if ($offset > 0) $nrows += $offset;
  40  	 	 	 $sql = "select * from ($sql) where rownum <= $nrows";
  41  	 	 	 $nrows = -1;
  42  	 	 }
  43  	 	 */
  44  
  45  	 	 return ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
  46  	 }
  47  }
  48  
  49  class ADORecordset_oci805 extends ADORecordset_oci8 {
  50  	 var $databaseType = "oci805";
  51  }