adodb-oci805.inc.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * @version v5.20.17 31-Mar-2020
  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 http://adodb.org/
  13. *
  14. * Oracle 8.0.5 driver
  15. */
  16. // security - hide paths
  17. if (!defined('ADODB_DIR')) die();
  18. include_once(ADODB_DIR.'/drivers/adodb-oci8.inc.php');
  19. class ADODB_oci805 extends ADODB_oci8 {
  20. var $databaseType = "oci805";
  21. var $connectSID = true;
  22. function SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0)
  23. {
  24. // seems that oracle only supports 1 hint comment in 8i
  25. if (strpos($sql,'/*+') !== false)
  26. $sql = str_replace('/*+ ','/*+FIRST_ROWS ',$sql);
  27. else
  28. $sql = preg_replace('/^[ \t\n]*select/i','SELECT /*+FIRST_ROWS*/',$sql);
  29. /*
  30. The following is only available from 8.1.5 because order by in inline views not
  31. available before then...
  32. http://www.jlcomp.demon.co.uk/faq/top_sql.html
  33. if ($nrows > 0) {
  34. if ($offset > 0) $nrows += $offset;
  35. $sql = "select * from ($sql) where rownum <= $nrows";
  36. $nrows = -1;
  37. }
  38. */
  39. return ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
  40. }
  41. }
  42. class ADORecordset_oci805 extends ADORecordset_oci8 {
  43. var $databaseType = "oci805";
  44. function __construct($id,$mode=false)
  45. {
  46. parent::__construct($id,$mode);
  47. }
  48. }