本文整理汇总了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);
}
示例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);
}