oci_bind_array_by_name

PHP 5 >= 5.1.2, PHP 7, PHP 8, PECL OCI8 >= 1.2.0
oci_bind_array_by_name - Binds a PHP array to an Oracle PL/SQL array parameter
Manual
Code Examples

oci_bind_array_by_name(
     resource$statement,
     string$param,
     arrayvar,
     int$max_array_length,
     [int$max_item_length = -1],
     [int$type = SQLT_AFC]
): bool

Binds the PHP array var to the Oracle placeholder param, which points to an Oracle PL/SQL array. Whether it will be used for input or output will be determined at run-time.

Parameters

statement

A valid OCI statement identifier.

param

The Oracle placeholder.

var

An array.

max_array_length

Sets the maximum length both for incoming and result arrays.

max_item_length

Sets maximum length for array items. If not specified or equals to -1, oci_bind_array_by_name will find the longest element in the incoming array and will use it as the maximum length.

type

Should be used to set the type of PL/SQL array items. See list of available types below:

SQLT_NUM - for arrays of NUMBER.

SQLT_INT - for arrays of INTEGER (Note: INTEGER it is actually a synonym for NUMBER(38), but SQLT_NUM type won't work in this case even though they are synonyms).

SQLT_FLT - for arrays of FLOAT.

SQLT_AFC - for arrays of CHAR.

SQLT_CHR - for arrays of VARCHAR2.

SQLT_VCS - for arrays of VARCHAR.

SQLT_AVC - for arrays of CHARZ.

SQLT_STR - for arrays of STRING.

SQLT_LVC - for arrays of LONG VARCHAR.

SQLT_ODT - for arrays of DATE.

Return Values

Returns true on success or false on failure.

Example of oci_bind_array_by_name

Show all examples for oci_bind_array_by_name

PHP Version:


Function oci_bind_array_by_name:

Oracle OCI8 Functions

Most used PHP functions