]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/WikiDB/adodb/drivers/adodb-oci805.inc.php
Reformat code
[SourceForge/phpwiki.git] / lib / WikiDB / adodb / drivers / adodb-oci805.inc.php
1 <?php
2 /**
3  * @version V4.22 15 Apr 2004 (c) 2000-2004 John Lim (jlim@natsoft.com.my). 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 include_once(ADODB_DIR . '/drivers/adodb-oci8.inc.php');
16
17 class ADODB_oci805 extends ADODB_oci8
18 {
19     var $databaseType = "oci805";
20     var $connectSID = true;
21
22     function ADODB_oci805()
23     {
24         $this->ADODB_oci8();
25     }
26
27     function &SelectLimit($sql, $nrows = -1, $offset = -1, $inputarr = false, $secs2cache = 0)
28     {
29         // seems that oracle only supports 1 hint comment in 8i
30         if (strpos($sql, '/*+') !== false)
31             $sql = str_replace('/*+ ', '/*+FIRST_ROWS ', $sql);
32         else
33             $sql = preg_replace('/^[ \t\n]*select/i', 'SELECT /*+FIRST_ROWS*/', $sql);
34
35         /*
36             The following is only available from 8.1.5 because order by in inline views not
37             available before then...
38             http://www.jlcomp.demon.co.uk/faq/top_sql.html
39         if ($nrows > 0) {
40             if ($offset > 0) $nrows += $offset;
41             $sql = "select * from ($sql) where rownum <= $nrows";
42             $nrows = -1;
43         }
44         */
45
46         return ADOConnection::SelectLimit($sql, $nrows, $offset, $inputarr, $secs2cache);
47     }
48 }
49
50 class ADORecordset_oci805 extends ADORecordset_oci8
51 {
52     var $databaseType = "oci805";
53
54     function ADORecordset_oci805($id, $mode = false)
55     {
56         $this->ADORecordset_oci8($id, $mode);
57     }
58 }