eee
This commit is contained in:
+5
-3
@@ -28,7 +28,8 @@ use Kiri\Server\Events\OnTaskerStart;
|
|||||||
use Kiri\Server\Events\OnAfterRequest;
|
use Kiri\Server\Events\OnAfterRequest;
|
||||||
use Kiri\Di\Inject\Container;
|
use Kiri\Di\Inject\Container;
|
||||||
use Swoole\Timer;
|
use Swoole\Timer;
|
||||||
use Database\Base\PDO;
|
//use Database\Base\PDO;
|
||||||
|
use PDO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Connection
|
* Class Connection
|
||||||
@@ -334,9 +335,10 @@ class Connection extends Component
|
|||||||
/**
|
/**
|
||||||
* @return PDO
|
* @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_CASE => \PDO::CASE_NATURAL,
|
||||||
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
|
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
|
||||||
\PDO::ATTR_ORACLE_NULLS => \PDO::NULL_NATURAL,
|
\PDO::ATTR_ORACLE_NULLS => \PDO::NULL_NATURAL,
|
||||||
|
|||||||
Reference in New Issue
Block a user