v5:reference:connection:connect
This is an old revision of the document!
connect
See Also
The Connection Parameter Matrix
Syntax
mixed connect( optional string $parameter1 = '', optional string $parameter2 = '', optional string $parameter3 = '', optional string $parameter4 = '', optional bool $forceNewConnection=false )
Description
The essential function connect()
establishes a connection to a database using the provided parameters. The traditional description of the connection parameters is as follows:
Parameter 1 | Parameter 2 | Parameter 3 | Parameter 4 |
---|---|---|---|
$hostName | $userId | $password | $database |
However the actual values of the parameters for some databases are such that the actual requirements can be confusing. See the Connection Parameter Matrix for assistance.
v5/reference/connection/connect.1437865401.txt.gz · Last modified: 2017/04/21 11:36 (external edit)