00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 if (!defined('ADODB_DIR')) die();
00017
00018 include_once(ADODB_DIR."/drivers/adodb-ibase.inc.php");
00019
00020 class ADODB_borland_ibase extends ADODB_ibase {
00021 var $databaseType = "borland_ibase";
00022
00023 function ADODB_borland_ibase()
00024 {
00025 $this->ADODB_ibase();
00026 }
00027
00028 function BeginTrans()
00029 {
00030 if ($this->transOff) return true;
00031 $this->transCnt += 1;
00032 $this->autoCommit = false;
00033 $this->_transactionID = ibase_trans($this->ibasetrans, $this->_connectionID);
00034 return $this->_transactionID;
00035 }
00036
00037 function ServerInfo()
00038 {
00039 $arr['dialect'] = $this->dialect;
00040 switch($arr['dialect']) {
00041 case '':
00042 case '1': $s = 'Interbase 6.5, Dialect 1'; break;
00043 case '2': $s = 'Interbase 6.5, Dialect 2'; break;
00044 default:
00045 case '3': $s = 'Interbase 6.5, Dialect 3'; break;
00046 }
00047 $arr['version'] = '6.5';
00048 $arr['description'] = $s;
00049 return $arr;
00050 }
00051
00052
00053
00054
00055
00056
00057 function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0)
00058 {
00059 if ($nrows > 0) {
00060 if ($offset <= 0) $str = " ROWS $nrows ";
00061 else {
00062 $a = $offset+1;
00063 $b = $offset+$nrows;
00064 $str = " ROWS $a TO $b";
00065 }
00066 } else {
00067
00068 $a = $offset + 1;
00069 $str = " ROWS $a TO 999999999";
00070 }
00071 $sql .= $str;
00072
00073 return ($secs2cache) ?
00074 $this->CacheExecute($secs2cache,$sql,$inputarr)
00075 :
00076 $this->Execute($sql,$inputarr);
00077 }
00078
00079 };
00080
00081
00082 class ADORecordSet_borland_ibase extends ADORecordSet_ibase {
00083
00084 var $databaseType = "borland_ibase";
00085
00086 function ADORecordSet_borland_ibase($id,$mode=false)
00087 {
00088 $this->ADORecordSet_ibase($id,$mode);
00089 }
00090 }
00091 ?>