downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ocicolumnscale> <ocicolumnname
[edit] Last updated: Fri, 11 May 2012

view this page in

ocicolumnprecision

(PHP 4, PHP 5, PECL OCI8 >= 1.0.0)

ocicolumnprecisionAlias of oci_field_precision()

Description

Warning

This alias has been DEPRECATED as of PHP 5.4.0. Relying on this alias is highly discouraged.



add a note add a note User Contributed Notes ocicolumnprecision
webmaster at smwebdesigns dot com 15-Oct-2007 10:28
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;
}
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;
}

 
show source | credits | sitemap | contact | advertising | mirror sites