Function Database_Static_mysql_pdo->get_connection
Definitions
sources/database/mysql_pdo.php
- Get a database connection. This function shouldn't be used by you, as a connection to the database is established automatically.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: object
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$persistent | boolean | required parameter | N/A | N/A | Whether to create a persistent connection |
$db_name | string | required parameter | N/A | N/A | The database name |
$db_host | string | required parameter | N/A | N/A | The database host (the server) |
$db_user | string | required parameter | N/A | N/A | The database connection username |
$db_password | string | required parameter | N/A | N/A | The database connection password |
$fail_ok | boolean | False | N/A | N/A | Whether to on error echo an error and return with a null, rather than giving a critical error |
Return
- A database connection (null: error)
- Type: ?object
- Set: N/A
- Range: N/A