Documentation TYPO3 par Ameos

adodb-access.inc.php

00001 <?php
00002 /* 
00003 V4.80 8 Mar 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. See License.txt. 
00007   Set tabs to 4 for best viewing.
00008   
00009   Latest version is available at http://adodb.sourceforge.net
00010   
00011   Microsoft Access data driver. Requires ODBC. Works only on MS Windows.
00012 */
00013 if (!defined('_ADODB_ODBC_LAYER')) {
00014         if (!defined('ADODB_DIR')) die();
00015         
00016         include(ADODB_DIR."/drivers/adodb-odbc.inc.php");
00017 }
00018  if (!defined('_ADODB_ACCESS')) {
00019         define('_ADODB_ACCESS',1);
00020 
00021 class  ADODB_access extends ADODB_odbc {        
00022         var $databaseType = 'access';
00023         var $hasTop = 'top';            // support mssql SELECT TOP 10 * FROM TABLE
00024         var $fmtDate = "#Y-m-d#";
00025         var $fmtTimeStamp = "#Y-m-d h:i:sA#"; // note not comma
00026         var $_bindInputArray = false; // strangely enough, setting to true does not work reliably
00027         var $sysDate = "FORMAT(NOW,'yyyy-mm-dd')";
00028         var $sysTimeStamp = 'NOW';
00029         var $hasTransactions = false;
00030         
00031         function ADODB_access()
00032         {
00033         global $ADODB_EXTENSION;
00034         
00035                 $ADODB_EXTENSION = false;
00036                 $this->ADODB_odbc();
00037         }
00038         
00039         function Time()
00040         {
00041                 return time();
00042         }
00043         
00044         function BeginTrans() { return false;}
00045         
00046         function IfNull( $field, $ifNull ) 
00047         {
00048                 return " IIF(IsNull($field), $ifNull, $field) "; // if Access
00049         }
00050 /*
00051         function &MetaTables()
00052         {
00053         global $ADODB_FETCH_MODE;
00054         
00055                 $savem = $ADODB_FETCH_MODE;
00056                 $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
00057                 $qid = odbc_tables($this->_connectionID);
00058                 $rs = new ADORecordSet_odbc($qid);
00059                 $ADODB_FETCH_MODE = $savem;
00060                 if (!$rs) return false;
00061                 
00062                 $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change;
00063                 
00064                 $arr = &$rs->GetArray();
00065                 //print_pre($arr);
00066                 $arr2 = array();
00067                 for ($i=0; $i < sizeof($arr); $i++) {
00068                         if ($arr[$i][2] && $arr[$i][3] != 'SYSTEM TABLE')
00069                                 $arr2[] = $arr[$i][2];
00070                 }
00071                 return $arr2;
00072         }*/
00073 }
00074 
00075  
00076 class  ADORecordSet_access extends ADORecordSet_odbc {  
00077         
00078         var $databaseType = "access";           
00079         
00080         function ADORecordSet_access($id,$mode=false)
00081         {
00082                 return $this->ADORecordSet_odbc($id,$mode);
00083         }
00084 }// class
00085 } 
00086 ?>


Généré par Les spécialistes TYPO3 avec  doxygen 1.4.6