Documentation TYPO3 par Ameos |
00001 <?php 00002 /* 00003 V4.93 10 Oct 2006 (c) 2000-2006 John Lim (jlim#natsoft.com.my). All rights reserved. 00004 Released under both BSD license and Lesser GPL library license. 00005 Whenever there is any discrepancy between the two licenses, 00006 the BSD license will take precedence. 00007 Set tabs to 4 for best viewing. 00008 00009 Latest version is available at http://adodb.sourceforge.net 00010 00011 */ 00012 00013 // security - hide paths 00014 if (!defined('ADODB_DIR')) die(); 00015 00016 include_once(ADODB_DIR."/drivers/adodb-ibase.inc.php"); 00017 00018 class ADODB_firebird extends ADODB_ibase { 00019 var $databaseType = "firebird"; 00020 var $dialect = 3; 00021 00022 var $sysTimeStamp = "CURRENT_TIMESTAMP"; //"cast('NOW' as timestamp)"; 00023 00024 function ADODB_firebird() 00025 { 00026 $this->ADODB_ibase(); 00027 } 00028 00029 function ServerInfo() 00030 { 00031 $arr['dialect'] = $this->dialect; 00032 switch($arr['dialect']) { 00033 case '': 00034 case '1': $s = 'Firebird Dialect 1'; break; 00035 case '2': $s = 'Firebird Dialect 2'; break; 00036 default: 00037 case '3': $s = 'Firebird Dialect 3'; break; 00038 } 00039 $arr['version'] = ADOConnection::_findvers($s); 00040 $arr['description'] = $s; 00041 return $arr; 00042 } 00043 00044 // Note that Interbase 6.5 uses this ROWS instead - don't you love forking wars! 00045 // SELECT col1, col2 FROM table ROWS 5 -- get 5 rows 00046 // SELECT col1, col2 FROM TABLE ORDER BY col1 ROWS 3 TO 7 -- first 5 skip 2 00047 function &SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false, $secs=0) 00048 { 00049 $nrows = (integer) $nrows; 00050 $offset = (integer) $offset; 00051 $str = 'SELECT '; 00052 if ($nrows >= 0) $str .= "FIRST $nrows "; 00053 $str .=($offset>=0) ? "SKIP $offset " : ''; 00054 00055 $sql = preg_replace('/^[ \t]*select/i',$str,$sql); 00056 if ($secs) 00057 $rs =& $this->CacheExecute($secs,$sql,$inputarr); 00058 else 00059 $rs =& $this->Execute($sql,$inputarr); 00060 00061 return $rs; 00062 } 00063 00064 00065 }; 00066 00067 00068 class ADORecordSet_firebird extends ADORecordSet_ibase { 00069 00070 var $databaseType = "firebird"; 00071 00072 function ADORecordSet_firebird($id,$mode=false) 00073 { 00074 $this->ADORecordSet_ibase($id,$mode); 00075 } 00076 } 00077 ?>