tags:

views:

477

answers:

1

I have a PL/SQL procedure that takes as input parameter a TABLE OF TYPE NUMBER(10).

I'am trying to call it from php right now. The binding doesn't rise any error, everything is fine. But the content of my binding is not the one I expected!

For example I bind an array: array(19465,19467) On the pl/sql side I get this kind of values: -2.50000000000000000000000000000000E+107

It appears that something wrong happen in the precision/length/type? of my binding, but I am lost.

Here is my binding: oci_bind_array_by_name($stmt, ':name', $array, -1, SQLT_NUM);

A: 

Try using "SQLT_INT" in place of "SQLT_NUM". Even though INTEGER is a synonym for NUMBER(38), SQLT_NUM does not work.

(From php bug reports: [27 Oct 2006 8:37am UTC] [email protected] Change SQLT_NUM to SQLT_INT and it works fine. There is no difference for OCI8 between those two bind types (they are handled by the same function in the very same way), so there must be some difference in OCI library itself.)

I tried that but it didn't change anything unfortunately.
Valentin Jacquemin