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 — Alias of oci_field_precision()
Description
Warning
This alias has been DEPRECATED as of PHP 5.4.0. Relying on this alias is highly discouraged.
webmaster at smwebdesigns dot com
15-Oct-2007 10:28
webmaster at smwebdesigns dot com
12-Oct-2007 05:09
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;
}
