note 78431 modified in function.ocicolumnprecision by sixd
| From: | sixd@php.net | Date: | Thu, 08 Oct 2009 19:13:09 +0000 |
| Subject: | note 78431 modified in function.ocicolumnprecision by sixd | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-161528@lists.php.net to get a copy of this message | ||
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;
}
--was--
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;
}
http://php.net/manual/en/function.ocicolumnprecision.php