Tell Me
 

Creating a Database Connection

Previous previous|next Next Page

The hr_db.inc file contains a db_connect() function that calls the OCI8 oci_connect() library function for creating a database connection.

The db_connect() function provides two parameters:

$pw for the password, with default value ORA_CON_PW

The db_connect() function returns a database connection identifier, or false on error. The db_connect() function uses ORA_CON_DB for connecting to the target database instance.

Note: After each page request, a database connection opened with the oci_connect() call is implicitly closed. If you want, you can explicitly close the database connection by calling the oci_close() function.