Use the Index DSN to create the PDO based DB instance.
This commit is contained in:
parent
163ff95cdf
commit
50fac1e585
3 changed files with 24 additions and 20 deletions
|
@ -78,8 +78,7 @@ define('MSZ_DB_INIT', 'SET SESSION time_zone = \'+00:00\', sql_mode = \'STRICT_T
|
|||
$db = DbTools::create($dbConfig['dsn']);
|
||||
$db->execute(MSZ_DB_INIT);
|
||||
|
||||
$dbConfig = $dbConfig['Database'] ?? $dbConfig['Database.mysql-main'] ?? [];
|
||||
DB::init(DB::buildDSN($dbConfig), $dbConfig['username'] ?? '', $dbConfig['password'] ?? '', DB::ATTRS);
|
||||
DB::init(DbTools::parse($dbConfig['dsn']));
|
||||
DB::exec(MSZ_DB_INIT);
|
||||
|
||||
$cfg = new DbConfig($db);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue