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
00024 function ADODB_borland_ibase()
00025 {
00026 $this->ADODB_ibase();
00027 }
00028
00029 function BeginTrans()
00030 {
00031 if ($this->transOff) return true;
00032 $this->transCnt += 1;
00033 $this->autoCommit = false;
00034 $this->_transactionID = ibase_trans($this->ibasetrans, $this->_connectionID);
00035 return $this->_transactionID;
00036 }
00037
00038 function ServerInfo()
00039 {
00040 $arr['dialect'] = $this->dialect;
00041 switch($arr['dialect']) {
00042 case '':
00043 case '1': $s = 'Interbase 6.5, Dialect 1'; break;
00044 case '2': $s = 'Interbase 6.5, Dialect 2'; break;
00045 default:
00046 case '3': $s = 'Interbase 6.5, Dialect 3'; break;
00047 }
00048 $arr['version'] = '6.5';
00049 $arr['description'] = $s;
00050 return $arr;
00051 }
00052
00053
00054
00055
00056
00057
00058 function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0)
00059 {
00060 if ($nrows > 0) {
00061 if ($offset <= 0) $str = " ROWS $nrows ";
00062 else {
00063 $a = $offset+1;
00064 $b = $offset+$nrows;
00065 $str = " ROWS $a TO $b";
00066 }
00067 } else {
00068
00069 $a = $offset + 1;
00070 $str = " ROWS $a TO 999999999";
00071 }
00072 $sql .= $str;
00073
00074 return ($secs2cache) ?
00075 $this->CacheExecute($secs2cache,$sql,$inputarr)
00076 :
00077 $this->Execute($sql,$inputarr);
00078 }
00079
00080 };
00081
00082
00083 class ADORecordSet_borland_ibase extends ADORecordSet_ibase {
00084
00085 var $databaseType = "borland_ibase";
00086
00087 function ADORecordSet_borland_ibase($id,$mode=false)
00088 {
00089 $this->ADORecordSet_ibase($id,$mode);
00090 }
00091 }
00092 ?>