mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 23:52:49 +08:00
Think/Db/Lite类调整 必须设置dsn参数
This commit is contained in:
@@ -90,7 +90,7 @@ class Lite {
|
|||||||
if(empty($config)) $config = $this->config;
|
if(empty($config)) $config = $this->config;
|
||||||
try{
|
try{
|
||||||
if(empty($config['dsn'])) {
|
if(empty($config['dsn'])) {
|
||||||
$config['dsn'] = $this->parseDsn($config);
|
E('Think/Db/Lite 必须设置 dsn参数');
|
||||||
}
|
}
|
||||||
$this->linkID[$linkNum] = new PDO( $config['dsn'], $config['username'], $config['password'],$config['params']);
|
$this->linkID[$linkNum] = new PDO( $config['dsn'], $config['username'], $config['password'],$config['params']);
|
||||||
}catch (\PDOException $e) {
|
}catch (\PDOException $e) {
|
||||||
@@ -100,14 +100,6 @@ class Lite {
|
|||||||
return $this->linkID[$linkNum];
|
return $this->linkID[$linkNum];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 解析pdo连接的dsn信息
|
|
||||||
* @access public
|
|
||||||
* @param array $config 连接信息
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
protected function parseDsn($config){}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 释放查询结果
|
* 释放查询结果
|
||||||
* @access public
|
* @access public
|
||||||
|
|||||||
Reference in New Issue
Block a user