本文整理汇总了PHP中ADORecordSet::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP ADORecordSet::__construct方法的具体用法?PHP ADORecordSet::__construct怎么用?PHP ADORecordSet::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ADORecordSet
的用法示例。
在下文中一共展示了ADORecordSet::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
function __construct($id, $mode = false)
{
if ($mode === false) {
global $ADODB_FETCH_MODE;
$mode = $ADODB_FETCH_MODE;
}
$this->fetchMode = $mode;
return parent::__construct($id, $mode);
}
示例2:
function __construct($id, $mode = false)
{
if ($mode === false) {
global $ADODB_FETCH_MODE;
$mode = $ADODB_FETCH_MODE;
}
if (!$mode) {
$this->fetchMode = ADODB_FETCH_ASSOC;
} else {
$this->fetchMode = $mode;
}
parent::__construct($id, $mode);
}
示例3: switch
function __construct($queryID, $mode = false)
{
if ($mode === false) {
global $ADODB_FETCH_MODE;
$mode = $ADODB_FETCH_MODE;
}
switch ($mode) {
case ADODB_FETCH_NUM:
$this->fetchMode = MYSQL_NUM;
break;
case ADODB_FETCH_ASSOC:
$this->fetchMode = MYSQL_ASSOC;
break;
case ADODB_FETCH_DEFAULT:
case ADODB_FETCH_BOTH:
default:
$this->fetchMode = MYSQL_BOTH;
break;
}
$this->adodbFetchMode = $mode;
parent::__construct($queryID);
}
示例4:
/**
* Constructor
*/
function __construct($fakeid = 1)
{
global $ADODB_FETCH_MODE, $ADODB_COMPAT_FETCH;
// fetch() on EOF does not delete $this->fields
$this->compat = !empty($ADODB_COMPAT_FETCH);
parent::__construct($fakeid);
// fake queryID
$this->fetchMode = $ADODB_FETCH_MODE;
}
示例5:
function __construct($id, $mode = false)
{
// freedts check...
$this->hasFetchAssoc = function_exists('mssql_fetch_assoc');
if ($mode === false) {
global $ADODB_FETCH_MODE;
$mode = $ADODB_FETCH_MODE;
}
$this->fetchMode = $mode;
return parent::__construct($id, $mode);
}
示例6:
function __construct($id, $mode = false)
{
global $ADODB_FETCH_MODE;
$this->fetchMode = $mode === false ? $ADODB_FETCH_MODE : $mode;
parent::__construct($id);
}
示例7:
function __construct($queryID, $mode = false)
{
if ($mode === false) {
global $ADODB_FETCH_MODE;
$mode = $ADODB_FETCH_MODE;
}
$this->fetchMode = $mode;
parent::__construct($queryID);
}
示例8: switch
function __construct($queryID, $mode = false)
{
if (!$mode) {
global $ADODB_FETCH_MODE;
$mode = $ADODB_FETCH_MODE;
}
switch ($mode) {
case ADODB_FETCH_NUM:
$this->fetchMode = FBSQL_NUM;
break;
case ADODB_FETCH_ASSOC:
$this->fetchMode = FBSQL_ASSOC;
break;
case ADODB_FETCH_BOTH:
default:
$this->fetchMode = FBSQL_BOTH;
break;
}
return parent::__construct($queryID);
}
示例9: switch
function __construct($id, $mode = false)
{
if ($mode === false) {
global $ADODB_FETCH_MODE;
$mode = $ADODB_FETCH_MODE;
}
$this->adodbFetchMode = $mode;
switch ($mode) {
case ADODB_FETCH_NUM:
$mode = PDO::FETCH_NUM;
break;
case ADODB_FETCH_ASSOC:
$mode = PDO::FETCH_ASSOC;
break;
case ADODB_FETCH_BOTH:
default:
$mode = PDO::FETCH_BOTH;
break;
}
$this->fetchMode = $mode;
$this->_queryID = $id;
parent::__construct($id);
}