Predefined Constants

The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.

OCI8 Function and Method Modes
ConstantDescription
OCI_ASSOCUsed with oci_fetch_all() and oci_fetch_array() to get results as an associative array.
OCI_BOTHUsed with oci_fetch_all() and oci_fetch_array() to get results as an array with both associative and number indices.
OCI_COMMIT_ON_SUCCESSStatement execution mode for oci_execute() call. Automatically commit changes when the statement has succeeded.
OCI_CRED_EXTUsed with oci_connect() for using Oracles' External or OS authentication.
OCI_DEFAULTSee OCI_NO_AUTO_COMMIT.
OCI_DESCRIBE_ONLYStatement execution mode for oci_execute(). Use this mode if you want meta data such as the column names but don't want to fetch rows from the query.
OCI_EXACT_FETCHObsolete. Statement fetch mode. Used when the application knows in advance exactly how many rows it will be fetching. This mode turns prefetching off for Oracle release 8 or later mode. The cursor is canceled after the desired rows are fetched which may result in reduced server-side resource usage.
OCI_FETCHSTATEMENT_BY_COLUMNDefault mode of oci_fetch_all().
OCI_FETCHSTATEMENT_BY_ROWAlternative mode of oci_fetch_all().
OCI_LOB_BUFFER_FREEUsed with OCILob::flush to free buffers used.
OCI_NO_AUTO_COMMITStatement execution mode for oci_execute(). The transaction is not automatically committed when using this mode. For readability in new code, use this value instead of the older, equivalent OCI_DEFAULT constant.
OCI_NUMUsed with oci_fetch_all() and oci_fetch_array() to get results as an enumerated array.
OCI_RETURN_LOBSUsed with oci_fetch_array() to get the data value of the LOB instead of the descriptor.
OCI_RETURN_NULLSUsed with oci_fetch_array() to get empty array elements if the row items value is null.
OCI_SEEK_CURUsed with OCILob::seek to set the seek position.
OCI_SEEK_ENDUsed with OCILob::seek to set the seek position.
OCI_SEEK_SETUsed with OCILob::seek to set the seek position.
OCI_SYSDATEObsolete.
OCI_SYSDBAUsed with oci_connect() to connect with the SYSDBA privilege. The php.ini setting oci8.privileged_connect should be enabled to use this.
OCI_SYSOPERUsed with oci_connect() to connect with the SYSOPER privilege. The php.ini setting oci8.privileged_connect should be enabled to use this.
OCI_TEMP_BLOBUsed with OCILob::writeTemporary to indicate that a temporary BLOB should be created.
OCI_TEMP_CLOBUsed with OCILob::writeTemporary to indicate that a temporary CLOB should be created.
OCI8 Bind and Define Types
ConstantDescription
OCI_B_BFILEUsed with oci_bind_by_name() when binding BFILEs.
OCI_B_BINUsed with oci_bind_by_name() to bind RAW values.
OCI_B_BLOBUsed with oci_bind_by_name() when binding BLOBs.
OCI_B_BOLUsed with oci_bind_by_name() to bind a PL/SQL BOOLEAN variable.
OCI_B_CFILEEUsed with oci_bind_by_name() when binding CFILEs.
OCI_B_CLOBUsed with oci_bind_by_name() when binding CLOBs.
OCI_B_CURSORUsed with oci_bind_by_name() when binding cursors, previously allocated with oci_new_descriptor().
OCI_B_INTUsed with oci_bind_array_by_name() to bind arrays of INTEGER.
OCI_B_NTYUsed with oci_bind_by_name() when binding named data types.
OCI_B_NUMUsed with oci_bind_array_by_name() to bind arrays of NUMBER.
OCI_B_ROWIDUsed with oci_bind_by_name() when binding ROWIDs.
SQLT_AFCUsed with oci_bind_array_by_name() to bind arrays of CHAR.
SQLT_AVCUsed with oci_bind_array_by_name() to bind arrays of VARCHAR2.
SQLT_BDOUBLENot supported.
SQLT_BFILEEThe same as OCI_B_BFILE.
SQLT_BFLOATNot supported.
SQLT_BINThe same as OCI_B_BIN.
SQLT_BLOBThe same as OCI_B_BLOB.
SQLT_BOLThe same as OCI_B_BOL.
SQLT_CFILEEThe same as OCI_B_CFILEE.
SQLT_CHRUsed with oci_bind_array_by_name() to bind arrays of VARCHAR2. Also used with oci_bind_by_name().
SQLT_CLOBThe same as OCI_B_CLOB.
SQLT_FLTUsed with oci_bind_array_by_name() to bind arrays of FLOAT.
SQLT_INTThe same as OCI_B_INT.
SQLT_LBIUsed with oci_bind_by_name() to bind LONG RAW values.
SQLT_LNGUsed with oci_bind_by_name() to bind LONG values.
SQLT_LVCUsed with oci_bind_array_by_name() to bind arrays of LONG VARCHAR.
SQLT_NTYThe same as OCI_B_NTY.
SQLT_NUMThe same as OCI_B_NUM.
SQLT_ODTUsed with oci_bind_array_by_name() to bind arrays of LONG.
SQLT_RDDThe same as OCI_B_ROWID.
SQLT_RSETThe same as OCI_B_CURSOR.
SQLT_STRUsed with oci_bind_array_by_name() to bind arrays of STRING.
SQLT_UINNot supported.
SQLT_VCSUsed with oci_bind_array_by_name() to bind arrays of VARCHAR.
OCI8 Descriptor Types
ConstantDescription
OCI_DTYPE_FILEThis flag tells oci_new_descriptor() to initialize a new FILE descriptor.
OCI_DTYPE_LOBThis flag tells oci_new_descriptor() to initialize a new LOB descriptor.
OCI_DTYPE_ROWIDThis flag tells oci_new_descriptor() to initialize a new ROWID descriptor.
OCI_D_FILEThe same as OCI_DTYPE_FILE.
OCI_D_LOBThe same as OCI_DTYPE_LOB.
OCI_D_ROWIDThe same as OCI_DTYPE_ROWID.
OCI8 Transparent Application Failover (TAF) Constants
ConstantsDescription
OCI_FO_ABORT (int)Failover was unsuccessful and there is no option of retrying.
OCI_FO_BEGIN (int)Failover has detected a lost connection and failover is starting.
OCI_FO_END (int)Failover completed successfully.
OCI_FO_ERROR (int)Failover was unsuccessful but it gives the application the opportunity to handle the error and return OCI_FO_RETRY to retry failover.
OCI_FO_NONE (int)The user has not requested a failover type.
OCI_FO_REAUTH (int)An Oracle user has been re-authenticated.
OCI_FO_RETRY (int)The failover should be attempted again by Oracle. In case of an error while failing over to a new connection, TAF is able to retry the failover. Typically, the application code should sleep for a while before returning OCI_FO_RETRY.
OCI_FO_SELECT (int)The user has requested SELECT failover as well. It allows users with open cursors to continue fetching from them after failure.
OCI_FO_SESSION (int)The user has requested only session failover. For example, if a user's connection is lost, then a new session is automatically created for the user on the backup. This type of failover does not attempt to recover SELECTs.
OCI_FO_TXNAL (int)The user has requested a transaction failover.