I need to associate a floating point number with an OCI instruction.
What am I doing:
$price = 0.1 oci_bind_by_name($resource, 'price', $price);
In my Oracle database, “price” is the argument to the stored procedure, and the type is NUMERIC.
After completing my statement, I get the following error:
Message: oci_execute () [function.oci-execute]: ORA-06502: PL / SQL: numeric or value error: error converting number to number ORA-06512: on line 1
If $ price is an integer, everything works fine. In PHP docs http://lv.php.net/manual/en/function.oci-bind-by-name.php I did not find a special type for float for the fifth parameter (int $ type = SQLT_CHR).
Found answer: I just changed the decimal character in my OS from "," to ".". and now everything is working fine
source share