]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - lib/WikiDB/adodb/drivers/adodb-oci805.inc.php
new ADODB library 4.22 with multiple drivers (not only mysql as before), major change...
[SourceForge/phpwiki.git] / lib / WikiDB / adodb / drivers / adodb-oci805.inc.php
1 <?php\r
2 /** \r
3  * @version V4.22 15 Apr 2004 (c) 2000-2004 John Lim (jlim@natsoft.com.my). All rights reserved.\r
4  * Released under both BSD license and Lesser GPL library license. \r
5  * Whenever there is any discrepancy between the two licenses, \r
6  * the BSD license will take precedence. \r
7  *\r
8  * Set tabs to 4 for best viewing.\r
9  * \r
10  * Latest version is available at http://php.weblogs.com\r
11  *\r
12  * Oracle 8.0.5 driver\r
13 */\r
14 \r
15 include_once(ADODB_DIR.'/drivers/adodb-oci8.inc.php');\r
16 \r
17 class ADODB_oci805 extends ADODB_oci8 {\r
18         var $databaseType = "oci805";   \r
19         var $connectSID = true;\r
20         \r
21         function ADODB_oci805() \r
22         {\r
23                 $this->ADODB_oci8();\r
24         }\r
25         \r
26         function &SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0)\r
27         {\r
28                 // seems that oracle only supports 1 hint comment in 8i\r
29                 if (strpos($sql,'/*+') !== false)\r
30                         $sql = str_replace('/*+ ','/*+FIRST_ROWS ',$sql);\r
31                 else\r
32                         $sql = preg_replace('/^[ \t\n]*select/i','SELECT /*+FIRST_ROWS*/',$sql);\r
33                 \r
34                 /* \r
35                         The following is only available from 8.1.5 because order by in inline views not \r
36                         available before then...\r
37                         http://www.jlcomp.demon.co.uk/faq/top_sql.html\r
38                 if ($nrows > 0) {       \r
39                         if ($offset > 0) $nrows += $offset;\r
40                         $sql = "select * from ($sql) where rownum <= $nrows";\r
41                         $nrows = -1;\r
42                 }\r
43                 */\r
44 \r
45                 return ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);\r
46         }\r
47 }\r
48 \r
49 class ADORecordset_oci805 extends ADORecordset_oci8 {   \r
50         var $databaseType = "oci805";\r
51         function ADORecordset_oci805($id,$mode=false)\r
52         {\r
53                 $this->ADORecordset_oci8($id,$mode);\r
54         }\r
55 }\r
56 ?>