I did not test well before posting previous code. This if statement works and the other does not.
if( ocicolumnscale($R, $i ) != 129 )
{
$int_decimal = ocicolumnscale($R, $i );
$int_length = ocicolumnprecision($R, $i) - $int_decimal;
}
ocicolumnprecision
(PHP 4, PHP 5, PECL OCI8 >= 1.0.0)
ocicolumnprecision — Sinônimo de oci_field_precision()
Descrição
Esta função é um apelido para: oci_field_precision().
User Contributed Notes
ocicolumnprecision
ocicolumnprecision
webmaster at smwebdesigns dot com
15-Oct-2007 10:58
15-Oct-2007 10:58
webmaster at smwebdesigns dot com
11-Oct-2007 04:39
11-Oct-2007 04:39
I've found that when using ocicolumnprecision or oci_field_precision it will not show you the decimal places if you are are reading from tables with decimals. You can use ocicolumnscale or oci_field_scale to find the decimal.
if( ocicolumnscale($R, $i ) > 0 )
{
$int_decimal = ocicolumnscale($R, $i );
$int_length = ocicolumnprecision($R, $i) - $int_decimal;
}

ocicolumnname