Skip to content

Commit ea35557

Browse files
author
ethan
committed
getReadPdo
1 parent d2b59a6 commit ea35557

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Connection.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ class Connection
2020
protected $queryLog = array();
2121

2222
protected $config = array(
23-
//'dsn' => 'mysql:host=localhost;dbname=test',
24-
'host' => 'localhost',
25-
'database' => 'test',
23+
'dsn' => 'mysql:host=localhost;dbname=test',
24+
//'host' => 'localhost',
25+
//'database' => 'test',
2626

2727
'username' => 'root',
2828
'password' => '',
@@ -135,7 +135,9 @@ public function getReadPdo()
135135
} while (count($slaveDbConfig) > 0);
136136

137137
// 使用主库
138-
return $this->readPdo = $this->getPdo();
138+
//return $this->readPdo = $this->getPdo();
139+
140+
throw $ex;
139141
}
140142

141143
/**

0 commit comments

Comments
 (0)