mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-09-02 05:31:36 +08:00
throw_exception方法简化为E方法
删除redirect方法和N方法
This commit is contained in:
@@ -85,7 +85,7 @@ abstract class Driver {
|
||||
}
|
||||
$this->linkID[$linkNum] = new PDO( $config['dsn'], $config['username'], $config['password'],$config['params']);
|
||||
}catch (\PDOException $e) {
|
||||
throw_exception($e->getMessage());
|
||||
E($e->getMessage());
|
||||
}
|
||||
if(!empty($config['charset'])) {
|
||||
$this->linkID[$linkNum]->exec('SET NAMES '.$config['charset']);
|
||||
@@ -121,7 +121,7 @@ abstract class Driver {
|
||||
$this->debug(true);
|
||||
$this->PDOStatement = $this->_linkID->prepare($str);
|
||||
if(false === $this->PDOStatement)
|
||||
throw_exception($this->error());
|
||||
E($this->error());
|
||||
$result = $this->PDOStatement->execute($bind);
|
||||
// 调试结束
|
||||
$this->debug(false);
|
||||
@@ -150,7 +150,7 @@ abstract class Driver {
|
||||
$this->debug(true);
|
||||
$this->PDOStatement = $this->_linkID->prepare($str);
|
||||
if(false === $this->PDOStatement) {
|
||||
throw_exception($this->error());
|
||||
E($this->error());
|
||||
}
|
||||
$result = $this->PDOStatement->execute($bind);
|
||||
$this->debug(false);
|
||||
@@ -421,7 +421,7 @@ abstract class Driver {
|
||||
}else{
|
||||
// 查询字段的安全过滤
|
||||
if(!preg_match('/^[A-Z_\|\&\-.a-z0-9\(\)\,]+$/',trim($key))){
|
||||
throw_exception(L('_EXPRESS_ERROR_').':'.$key);
|
||||
E(L('_EXPRESS_ERROR_').':'.$key);
|
||||
}
|
||||
// 多条件支持
|
||||
$multi = is_array($val) && isset($val['_multi']);
|
||||
@@ -490,7 +490,7 @@ abstract class Driver {
|
||||
$data = is_string($val[1])? explode(',',$val[1]):$val[1];
|
||||
$whereStr .= ' ('.$key.' '.strtoupper($val[0]).' '.$this->parseValue($data[0]).' AND '.$this->parseValue($data[1]).' )';
|
||||
}else{
|
||||
throw_exception(L('_EXPRESS_ERROR_').':'.$val[0]);
|
||||
E(L('_EXPRESS_ERROR_').':'.$val[0]);
|
||||
}
|
||||
}else {
|
||||
$count = count($val);
|
||||
|
||||
@@ -41,13 +41,13 @@ class Oracle extends Driver{
|
||||
if ( !empty($this->PDOStatement) ) $this->free();
|
||||
$this->executeTimes++;
|
||||
// 记录开始执行时间
|
||||
Debug::remark('queryStartTime','time');
|
||||
$this->debug(true);
|
||||
$this->PDOStatement = $this->_linkID->prepare($str);
|
||||
if(false === $this->PDOStatement) {
|
||||
throw_exception($this->error());
|
||||
E($this->error());
|
||||
}
|
||||
$result = $this->PDOStatement->execute($bind);
|
||||
$this->debug();
|
||||
$this->debug(false);
|
||||
if ( false === $result) {
|
||||
$this->error();
|
||||
return false;
|
||||
|
||||
@@ -82,7 +82,7 @@ class Lite {
|
||||
}
|
||||
$this->linkID[$linkNum] = new PDO( $config['dsn'], $config['username'], $config['password'],$config['params']);
|
||||
}catch (\PDOException $e) {
|
||||
throw_exception($e->getMessage());
|
||||
E($e->getMessage());
|
||||
}
|
||||
if(!empty($config['charset'])) {
|
||||
$this->linkID[$linkNum]->exec('SET NAMES '.$config['charset']);
|
||||
@@ -117,7 +117,7 @@ class Lite {
|
||||
$this->debug(true);
|
||||
$this->PDOStatement = $this->_linkID->prepare($str);
|
||||
if(false === $this->PDOStatement)
|
||||
throw_exception($this->error());
|
||||
E($this->error());
|
||||
$result = $this->PDOStatement->execute($bind);
|
||||
$this->debug(false);
|
||||
if ( false === $result ) {
|
||||
@@ -145,7 +145,7 @@ class Lite {
|
||||
$this->debug(true);
|
||||
$this->PDOStatement = $this->_linkID->prepare($str);
|
||||
if(false === $this->PDOStatement) {
|
||||
throw_exception($this->error());
|
||||
E($this->error());
|
||||
}
|
||||
$result = $this->PDOStatement->execute($bind);
|
||||
$this->debug(false);
|
||||
|
||||
Reference in New Issue
Block a user