-
Notifications
You must be signed in to change notification settings - Fork 0
API DatabaseConnectionInstance
Christophe SAUVEUR edited this page Sep 29, 2024
·
1 revision
class DatabaseConnectionInstance extends chsxf\PDO\DatabaseManager
Instance of a database connection
Since 2.0
public function __construct(string $serverConfigurationKey, string $dsn, ?string $username = null, ?string $password = null, ?array $options = null, bool $useDatabaseErrorLogging = false)
Constructor
See chsxf\PDO\DatabaseManager::__construct()
Since 2.0
Name | Type | Description |
---|---|---|
$serverConfigurationKey |
string |
Server configuration key (matches the server keys declared in the configuration directives) |
$dsn |
string |
Data Source Name (ie mysql:host=localhost;dbname=mydb) |
$username |
string |
Username |
$password |
string |
Password |
$options |
array |
Driver options |
$useDatabaseErrorLogging |
bool |
Is set, errors will be logged in the database. False by default |
public function getServerConfigurationKey()
Returns the server configuration key
Since 2.0
string
Getting Started | Framework Reference | API Reference | MFX is released under the MIT license