[ Index ]
 

Code source de vtiger CRM 5.0.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/adodb/drivers/ -> adodb-access.inc.php (source)

   1  <?php
   2  /* 
   3  V4.90 8 June 2006  (c) 2000-2006 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. See License.txt. 
   7    Set tabs to 4 for best viewing.
   8    
   9    Latest version is available at http://adodb.sourceforge.net
  10    
  11    Microsoft Access data driver. Requires ODBC. Works only on MS Windows.
  12  */
  13  if (!defined('_ADODB_ODBC_LAYER')) {
  14      if (!defined('ADODB_DIR')) die();
  15      
  16      include(ADODB_DIR."/drivers/adodb-odbc.inc.php");
  17  }
  18   if (!defined('_ADODB_ACCESS')) {
  19       define('_ADODB_ACCESS',1);
  20  
  21  class  ADODB_access extends ADODB_odbc {    
  22      var $databaseType = 'access';
  23      var $hasTop = 'top';        // support mssql SELECT TOP 10 * FROM TABLE
  24      var $fmtDate = "#Y-m-d#";
  25      var $fmtTimeStamp = "#Y-m-d h:i:sA#"; // note not comma
  26      var $_bindInputArray = false; // strangely enough, setting to true does not work reliably
  27      var $sysDate = "FORMAT(NOW,'yyyy-mm-dd')";
  28      var $sysTimeStamp = 'NOW';
  29      var $hasTransactions = false;
  30      
  31  	function ADODB_access()
  32      {
  33      global $ADODB_EXTENSION;
  34      
  35          $ADODB_EXTENSION = false;
  36          $this->ADODB_odbc();
  37      }
  38      
  39  	function Time()
  40      {
  41          return time();
  42      }
  43      
  44  	function BeginTrans() { return false;}
  45      
  46  	function IfNull( $field, $ifNull ) 
  47      {
  48          return " IIF(IsNull($field), $ifNull, $field) "; // if Access
  49      }
  50  /*
  51      function &MetaTables()
  52      {
  53      global $ADODB_FETCH_MODE;
  54      
  55          $savem = $ADODB_FETCH_MODE;
  56          $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
  57          $qid = odbc_tables($this->_connectionID);
  58          $rs = new ADORecordSet_odbc($qid);
  59          $ADODB_FETCH_MODE = $savem;
  60          if (!$rs) return false;
  61          
  62          $rs->_has_stupid_odbc_fetch_api_change = $this->_has_stupid_odbc_fetch_api_change;
  63          
  64          $arr = &$rs->GetArray();
  65          //print_pre($arr);
  66          $arr2 = array();
  67          for ($i=0; $i < sizeof($arr); $i++) {
  68              if ($arr[$i][2] && $arr[$i][3] != 'SYSTEM TABLE')
  69                  $arr2[] = $arr[$i][2];
  70          }
  71          return $arr2;
  72      }*/
  73  }
  74  
  75   
  76  class  ADORecordSet_access extends ADORecordSet_odbc {    
  77      
  78      var $databaseType = "access";        
  79      
  80  	function ADORecordSet_access($id,$mode=false)
  81      {
  82          return $this->ADORecordSet_odbc($id,$mode);
  83      }
  84  }// class
  85  } 
  86  ?>


Généré le : Sun Feb 25 10:22:19 2007 par Balluche grâce à PHPXref 0.7