get_database function
The get_database function establishes a connection to a database on the database server. This function is part of the idsadmin class, which provides a library of basic functions for plug-ins for the HCL OpenAdmin Tool (OAT) for Informix®.
Syntax
get_database($dbname="sysmaster",$use_user=false)
Variable | Purpose | Restrictions |
---|---|---|
dbname | The database name. | Optional. The default is sysmaster. |
use_user | An indicator of whether to use SQL ToolBox user to connect to the database. When you are in the SQL ToolBox, set the value to true. | Optional. The default is false. |
Return values
The return value is the PDO database connection.
Example
This example establishes a connection to the sysmaster database.
$db = $this->idsadmin->get_database("sysmaster");