3 V4.98 13 Feb 2008 (c) 2000-2008 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 Set tabs to 4 for best viewing.
9 Latest version is available at http://adodb.sourceforge.net
11 Support Borland Interbase 6.5 and later
15 // security - hide paths
16 if (!defined('ADODB_DIR')) die();
18 include_once(ADODB_DIR
."/drivers/adodb-ibase.inc.php");
20 class ADODB_borland_ibase
extends ADODB_ibase
{
21 var $databaseType = "borland_ibase";
24 function ADODB_borland_ibase()
31 if ($this->transOff
) return true;
33 $this->autoCommit
= false;
34 $this->_transactionID
= ibase_trans($this->ibasetrans
, $this->_connectionID
);
35 return $this->_transactionID
;
40 $arr['dialect'] = $this->dialect
;
41 switch($arr['dialect']) {
43 case '1': $s = 'Interbase 6.5, Dialect 1'; break;
44 case '2': $s = 'Interbase 6.5, Dialect 2'; break;
46 case '3': $s = 'Interbase 6.5, Dialect 3'; break;
48 $arr['version'] = '6.5';
49 $arr['description'] = $s;
53 // Note that Interbase 6.5 uses ROWS instead - don't you love forking wars!
54 // SELECT col1, col2 FROM table ROWS 5 -- get 5 rows
55 // SELECT col1, col2 FROM TABLE ORDER BY col1 ROWS 3 TO 7 -- first 5 skip 2
57 // SELECT FIRST 5 SKIP 2 col1, col2 FROM TABLE
58 function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0)
61 if ($offset <= 0) $str = " ROWS $nrows ";
65 $str = " ROWS $a TO $b";
70 $str = " ROWS $a TO 999999999"; // 999 million
74 return ($secs2cache) ?
75 $this->CacheExecute($secs2cache,$sql,$inputarr)
77 $this->Execute($sql,$inputarr);
83 class ADORecordSet_borland_ibase
extends ADORecordSet_ibase
{
85 var $databaseType = "borland_ibase";
87 function ADORecordSet_borland_ibase($id,$mode=false)
89 $this->ADORecordSet_ibase($id,$mode);