本文整理汇总了PHP中OCIColumnPrecision函数的典型用法代码示例。如果您正苦于以下问题:PHP OCIColumnPrecision函数的具体用法?PHP OCIColumnPrecision怎么用?PHP OCIColumnPrecision使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OCIColumnPrecision函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _FetchField
function _FetchField($fieldOffset = -1)
{
$fld = new ADOFieldObject;
$fieldOffset += 1;
$fld->name =OCIcolumnname($this->_queryID, $fieldOffset);
$fld->type = OCIcolumntype($this->_queryID, $fieldOffset);
$fld->max_length = OCIcolumnsize($this->_queryID, $fieldOffset);
switch($fld->type) {
case 'NUMBER':
$p = OCIColumnPrecision($this->_queryID, $fieldOffset);
$sc = OCIColumnScale($this->_queryID, $fieldOffset);
if ($p != 0 && $sc == 0) $fld->type = 'INT';
break;
case 'CLOB':
case 'NCLOB':
case 'BLOB':
$fld->max_length = -1;
break;
}
return $fld;
}
示例2: ADOFieldObject
function &_FetchField($fieldOffset = -1)
{
$fld = new ADOFieldObject();
$fieldOffset += 1;
$fld->name = OCIcolumnname($this->_queryID, $fieldOffset);
$fld->type = OCIcolumntype($this->_queryID, $fieldOffset);
$fld->max_length = OCIcolumnsize($this->_queryID, $fieldOffset);
if ($fld->type == 'NUMBER') {
$p = OCIColumnPrecision($this->_queryID, $fieldOffset);
$sc = OCIColumnScale($this->_queryID, $fieldOffset);
if ($p != 0 && $sc == 0) {
$fld->type = 'INT';
}
//echo " $this->name ($p.$sc) ";
}
return $fld;
}