diff --git a/Connection.php b/Connection.php index e5a2bce..7857bd3 100644 --- a/Connection.php +++ b/Connection.php @@ -28,7 +28,8 @@ use Kiri\Server\Events\OnTaskerStart; use Kiri\Server\Events\OnAfterRequest; use Kiri\Di\Inject\Container; use Swoole\Timer; -use Database\Base\PDO; +//use Database\Base\PDO; +use PDO; /** * Class Connection @@ -334,9 +335,10 @@ class Connection extends Component /** * @return PDO */ - public function newConnect(): PDO + public function newConnect(): \PDO { - $pdo = new PDO($this->database, $this->cds, $this->username, $this->password, [ +// $pdo = new PDO($this->database, $this->cds, $this->username, $this->password, [ + $pdo = new \PDO('mysql:dbname=' . $this->database . ';host=' . $this->cds, $this->username, $this->password, [ \PDO::ATTR_CASE => \PDO::CASE_NATURAL, \PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION, \PDO::ATTR_ORACLE_NULLS => \PDO::NULL_NATURAL,