本文整理汇总了PHP中adodb_pdo_type函数的典型用法代码示例。如果您正苦于以下问题:PHP adodb_pdo_type函数的具体用法?PHP adodb_pdo_type怎么用?PHP adodb_pdo_type使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了adodb_pdo_type函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: FetchField
function FetchField($fieldOffset = -1)
{
$off = $fieldOffset + 1;
// offsets begin at 1
$o = new ADOFieldObject();
$arr = @$this->_queryID->getColumnMeta($fieldOffset);
if (!$arr) {
$o->name = 'bad getColumnMeta()';
$o->max_length = -1;
$o->type = 'VARCHAR';
$o->precision = 0;
# $false = false;
return $o;
}
//adodb_pr($arr);
$o->name = $arr['name'];
if (isset($arr['sqlsrv:decl_type']) && $arr['sqlsrv:decl_type'] != "null") {
/*
* If the database is SQL server, use the native built-ins
*/
$o->type = $arr['sqlsrv:decl_type'];
} elseif (isset($arr['native_type']) && $arr['native_type'] != "null") {
$o->type = $arr['native_type'];
} else {
$o->type = adodb_pdo_type($arr['pdo_type']);
}
$o->max_length = $arr['len'];
$o->precision = $arr['precision'];
switch (ADODB_ASSOC_CASE) {
case ADODB_ASSOC_CASE_LOWER:
$o->name = strtolower($o->name);
break;
case ADODB_ASSOC_CASE_UPPER:
$o->name = strtoupper($o->name);
break;
}
return $o;
}
示例2: ADOFieldObject
function &FetchField($fieldOffset = -1)
{
$off = $fieldOffset + 1;
// offsets begin at 1
$o = new ADOFieldObject();
$arr = @$this->_queryID->getColumnMeta($fieldOffset);
if (!$arr) {
$o->name = 'bad getColumnMeta()';
$o->max_length = -1;
$o->type = 'VARCHAR';
$o->precision = 0;
# $false = false;
return $o;
}
//adodb_pr($arr);
$o->name = $arr['name'];
if (isset($arr['native_type'])) {
$o->type = $arr['native_type'];
} else {
$o->type = adodb_pdo_type($arr['pdo_type']);
}
$o->max_length = $arr['len'];
$o->precision = $arr['precision'];
if (ADODB_ASSOC_CASE == 0) {
$o->name = strtolower($o->name);
} else {
if (ADODB_ASSOC_CASE == 1) {
$o->name = strtoupper($o->name);
}
}
return $o;
}
示例3: ADOFieldObject
function &FetchField($fieldOffset = -1)
{
$off=$fieldOffset+1; // offsets begin at 1
$o= new ADOFieldObject();
$arr = $this->_queryID->getColumnMeta($fieldOffset);
if (!$arr) return false;
//adodb_pr($arr);
$o->name = $arr['name'];
if (isset($arr['native_type'])) $o->type = $arr['native_type'];
else $o->type = adodb_pdo_type($arr['pdo_type']);
$o->max_length = $arr['len'];
$o->precision = $arr['precision'];
if (ADODB_ASSOC_CASE == 0) $o->name = strtolower($o->name);
else if (ADODB_ASSOC_CASE == 1) $o->name = strtoupper($o->name);
return $o;
}