oci_bind_by_name
Binds a PHP variable to an Oracle placeholder.
oci_bind_by_name Function synopsis
oci_bind_by_name(
$statement,
string $param,
mixed &$var,
int $max_length = -1,
int $type = 0
): bool
Parameters
$statement
A valid OCI8 statement identifier.
$param
Typestring
The colon-prefixed bind variable placeholder used in the
statement. The colon is optional
in $param. Oracle does not use question
marks for placeholders.
$var
Passed by referenceTypemixed
The PHP variable to be associated with $param
$max_length
OptionalTypeintDefault value-1
Sets the maximum length for the data. If you set it to -1, this
function will use the current length
of $var to set the maximum
length. In this case the $var must
exist and contain data
when oci_bind_by_name is called.
$type
OptionalTypeintDefault value0
The datatype that Oracle will treat the data as. The
default $type used
is SQLT_CHR. Oracle will convert the data
between this type and the database column (or PL/SQL variable
type), when possible.
Note that the parameter
$varis passed by reference, and contains additional/updated context data that may be useful.
Return value
Typebool
Returns true on success, false on failure
Changes to the oci_bind_by_name Function
PHP 8.4
- Function removed
PHP 8.0
- Return type added:
bool - Parameter name of parameter #1 changed:
$statement_resourceto$statement - Parameter name of parameter #2 changed:
$column_nameto$param - Parameter type added for parameter #2 (
$param):string - Parameter name of parameter #3 changed:
$variableto$var - Parameter type added for parameter #3 (
$var):mixed - Parameter name of parameter #4 changed:
$maximum_lengthto$max_length - Parameter type added for parameter #4 (
$max_length):int - Parameter default value added for position #4 (
$max_length):-1 - Parameter type added for parameter #5 (
$type):int - Parameter default value added for position #5 (
$type):0
oci_bind_by_name(
- $statement_resource,
+ $statement,
- $column_name,
+ string $param,
- &$variable,
+ mixed &$var,
- $maximum_length,
+ int $max_length = -1,
- $type
+ int $type = 0
- )
+ ): bool oci_bind_by_name Function Availability
oci_bind_by_name Function Availability| PHP Version | Availability |
|---|---|
| PHP 8.6Upcoming Release | No |
| PHP 8.5Supported (Latest) | No |
| PHP 8.4Supported | No |
| PHP 8.3Security-Fixes Only | Yes |
| PHP 8.2Security-Fixes Only | Yes |
| PHP 8.1Unsupported | Yes |
| PHP 8.0Unsupported | Yes |
| PHP 7.4Unsupported | Yes |
| PHP 7.3Unsupported | Yes |
| PHP 7.2Unsupported | Yes |
| PHP 7.1Unsupported | Yes |
| PHP 7.0Unsupported | Yes |
| PHP 5.6Unsupported | Yes |
| PHP 5.5Unsupported | Yes |
| PHP 5.4Unsupported | Yes |
| PHP 5.3Unsupported | Yes |