source: branches/comu-ver2/data/module/adodb/drivers/adodb-oci805.inc.php @ 18701

Revision 18701, 1.5 KB checked in by nanasess, 14 years ago (diff)

Copyright の更新(#601)

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id Revision Date
  • Property svn:mime-type set to text/x-httpd-php
Line 
1<?php
2/**
3 * @version v4.992 10 Nov 2009 (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
4 * Released under both BSD license and Lesser GPL library license.
5 * Whenever there is any discrepancy between the two licenses,
6 * the BSD license will take precedence.
7 *
8 * Set tabs to 4 for best viewing.
9 *
10 * Latest version is available at http://php.weblogs.com
11 *
12 * Oracle 8.0.5 driver
13*/
14
15// security - hide paths
16if (!defined('ADODB_DIR')) die();
17
18include_once(ADODB_DIR.'/drivers/adodb-oci8.inc.php');
19
20class ADODB_oci805 extends ADODB_oci8 {
21    var $databaseType = "oci805";   
22    var $connectSID = true;
23   
24    function ADODB_oci805()
25    {
26        $this->ADODB_oci8();
27    }
28   
29    function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0)
30    {
31        // seems that oracle only supports 1 hint comment in 8i
32        if (strpos($sql,'/*+') !== false)
33            $sql = str_replace('/*+ ','/*+FIRST_ROWS ',$sql);
34        else
35            $sql = preg_replace('/^[ \t\n]*select/i','SELECT /*+FIRST_ROWS*/',$sql);
36       
37        /*
38            The following is only available from 8.1.5 because order by in inline views not
39            available before then...
40            http://www.jlcomp.demon.co.uk/faq/top_sql.html
41        if ($nrows > 0) {   
42            if ($offset > 0) $nrows += $offset;
43            $sql = "select * from ($sql) where rownum <= $nrows";
44            $nrows = -1;
45        }
46        */
47
48        return ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
49    }
50}
51
52class ADORecordset_oci805 extends ADORecordset_oci8 {   
53    var $databaseType = "oci805";
54    function ADORecordset_oci805($id,$mode=false)
55    {
56        $this->ADORecordset_oci8($id,$mode);
57    }
58}
59?>
Note: See TracBrowser for help on using the repository browser.