resource db2_connect ( string $database
, string $username
, string $password
[, array $options
] )
db2_connect — Returns a connection to a database
-
database
-
For a cataloged connection to a database,
database
represents the database alias in the DB2 client catalog.For an uncataloged connection to a database,
database
represents a complete connection string in the following format:DATABASE=
where the parameters represent the following values:database
;HOSTNAME=hostname
;PORT=port
;PROTOCOL=TCPIP;UID=username
;PWD=password
;-
database
-
The name of the database.
-
hostname
-
The hostname or IP address of the database server.
-
port
-
The TCP/IP port on which the database is listening for requests.
-
username
-
The username with which you are connecting to the database.
-
password
-
The password with which you are connecting to the database.
-