[2] | 1 | <?php |
---|
| 2 | /** |
---|
[34] | 3 | * @version V4.94 23 Jan 2007 (c) 2000-2007 John Lim (jlim#natsoft.com.my). All rights reserved. |
---|
[2] | 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 |
---|
| 16 | if (!defined('ADODB_DIR')) die(); |
---|
| 17 | |
---|
| 18 | include_once(ADODB_DIR.'/drivers/adodb-oci8.inc.php'); |
---|
| 19 | |
---|
| 20 | class 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 | |
---|
| 52 | class 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 | ?> |
---|