CodeCharge Studio

connect Method (PHP)

Applies to

Connection Object

Syntax

<connection>->connect(database, host, port, user, password)

Return value

link identifier

Parameters

Name Type Description Required
database string Name of the database instance to connect to. No
host string Address of the host machine where the database resides. No
port string Port to connect to. No
user string User name to authenticate with. No
password string User password to authenticate with. No

Description

This method establishes a database connection using the specified parameters. This method can be used to establish a database connection at runtime, for instance when the connection parameters are not known at design-time.


On-line, printable versions and updates