db\driver类修正

This commit is contained in:
thinkphp
2015-12-11 14:04:20 +08:00
parent 8f594e5cb2
commit 73d75227a9

View File

@@ -58,7 +58,7 @@ abstract class Driver
'slave_no' => '', // 指定从服务器序号
];
// 数据库表达式
protected $comparison = ['eq' => '=', 'neq' => '<>', 'gt' => '>', 'egt' => '>=', 'lt' => '<', 'elt' => '<=', 'notlike' => 'NOT LIKE', 'like' => 'LIKE', 'in' => 'IN', 'notin' => 'NOT IN'];
protected $exp = ['eq' => '=', 'neq' => '<>', 'gt' => '>', 'egt' => '>=', 'lt' => '<', 'elt' => '<=', 'notlike' => 'NOT LIKE', 'like' => 'LIKE', 'in' => 'IN', 'notin' => 'NOT IN','not in' => 'NOT IN', 'between' => 'BETWEEN', 'not between' => 'NOT BETWEEN', 'notbetween' => 'NOT BETWEEN'];
// 查询表达式
protected $selectSql = 'SELECT%DISTINCT% %FIELD% FROM %TABLE%%FORCE%%JOIN%%WHERE%%GROUP%%HAVING%%ORDER%%LIMIT% %UNION%%LOCK%%COMMENT%';
// 查询次数
@@ -636,7 +636,7 @@ abstract class Driver
$data = is_string($val[1]) ? explode(',', $val[1]) : $val[1];
$whereStr .= $key . ' ' . $this->exp[$exp] . ' ' . $this->parseValue($data[0]) . ' AND ' . $this->parseValue($data[1]);
} else {
throw new Exception(Lang::get('_EXPRESS_ERROR_') . ':' . $val[0]);
throw new Exception('where express error:'. $val[0]);
}
} else {
$count = count($val);