當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DBAdapter::__construct方法代碼示例

本文整理匯總了PHP中DBAdapter::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP DBAdapter::__construct方法的具體用法?PHP DBAdapter::__construct怎麽用?PHP DBAdapter::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DBAdapter的用法示例。


在下文中一共展示了DBAdapter::__construct方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Constructor
  *
  * @param   rdbms.DBConnection conn
  */
 public function __construct($conn)
 {
     $this->map = array('varchar' => DB_ATTRTYPE_VARCHAR, 'char' => DB_ATTRTYPE_CHAR, 'int' => DB_ATTRTYPE_INT, 'int4' => DB_ATTRTYPE_INT, 'bigint' => DB_ATTRTYPE_NUMERIC, 'int8' => DB_ATTRTYPE_NUMERIC, 'mediumint' => DB_ATTRTYPE_SMALLINT, 'smallint' => DB_ATTRTYPE_SMALLINT, 'int2' => DB_ATTRTYPE_SMALLINT, 'tinyint' => DB_ATTRTYPE_TINYINT, 'date' => DB_ATTRTYPE_DATE, 'time' => DB_ATTRTYPE_DATETIME, 'timestamp' => DB_ATTRTYPE_TIMESTAMP, 'mediumtext' => DB_ATTRTYPE_TEXT, 'text' => DB_ATTRTYPE_TEXT, 'enum' => DB_ATTRTYPE_ENUM, 'decimal' => DB_ATTRTYPE_DECIMAL, 'float' => DB_ATTRTYPE_FLOAT, 'money' => DB_ATTRTYPE_MONEY, 'numeric' => DB_ATTRTYPE_NUMERIC, 'bool' => DB_ATTRTYPE_BIT);
     parent::__construct($conn);
 }
開發者ID:melogamepay,項目名稱:xp-framework,代碼行數:10,代碼來源:PostgreSQLDBAdapter.class.php

示例2: __construct

 /**
  * Constructor
  *
  * @param   Object conn database connection
  */
 public function __construct($conn)
 {
     $this->map = array('binary' => DB_ATTRTYPE_BINARY, 'bit' => DB_ATTRTYPE_BIT, 'char' => DB_ATTRTYPE_CHAR, 'datetime' => DB_ATTRTYPE_DATETIME, 'datetimn' => DB_ATTRTYPE_DATETIMN, 'decimal' => DB_ATTRTYPE_DECIMAL, 'decimaln' => DB_ATTRTYPE_DECIMALN, 'float' => DB_ATTRTYPE_FLOAT, 'floatn' => DB_ATTRTYPE_FLOATN, 'image' => DB_ATTRTYPE_IMAGE, 'int' => DB_ATTRTYPE_INT, 'intn' => DB_ATTRTYPE_INTN, 'money' => DB_ATTRTYPE_MONEY, 'moneyn' => DB_ATTRTYPE_MONEYN, 'nchar' => DB_ATTRTYPE_NCHAR, 'numeric' => DB_ATTRTYPE_NUMERIC, 'numericn' => DB_ATTRTYPE_NUMERICN, 'nvarchar' => DB_ATTRTYPE_NVARCHAR, 'real' => DB_ATTRTYPE_REAL, 'smalldatetime' => DB_ATTRTYPE_SMALLDATETIME, 'smallint' => DB_ATTRTYPE_SMALLINT, 'smallmoney' => DB_ATTRTYPE_SMALLMONEY, 'sysname' => DB_ATTRTYPE_SYSNAME, 'text' => DB_ATTRTYPE_TEXT, 'timestamp' => DB_ATTRTYPE_TIMESTAMP, 'tinyint' => DB_ATTRTYPE_TINYINT, 'varbinary' => DB_ATTRTYPE_VARBINARY, 'varchar' => DB_ATTRTYPE_VARCHAR);
     parent::__construct($conn);
 }
開發者ID:melogamepay,項目名稱:xp-framework,代碼行數:10,代碼來源:MsSQLDBAdapter.class.php


注:本文中的DBAdapter::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。