Think\Db\Driver类 删除queryID属性

oracle驱动类 添加parseLock方法
This commit is contained in:
thinkphp
2013-03-25 11:36:23 +08:00
parent d91ac474d1
commit 3a77fd3a23
2 changed files with 12 additions and 4 deletions

View File

@@ -36,8 +36,6 @@ class Driver {
protected $linkID = [];
// 当前连接ID
protected $_linkID = null;
// 当前查询ID
protected $queryID = null;
// 数据库连接参数配置
protected $config = [];
// 数据库表达式
@@ -255,7 +253,7 @@ class Driver {
public function error() {
if($this->PDOStatement) {
$error = $this->PDOStatement->errorInfo();
$this->error = $error[2];
$this->error = $error[1].':'.$error[2];
}else{
$this->error = '';
}
@@ -934,7 +932,7 @@ class Driver {
*/
public function __destruct() {
// 释放查询
if ($this->queryID){
if ($this->PDOStatement){
$this->free();
}
// 关闭连接

View File

@@ -157,4 +157,14 @@ class Oracle extends Driver{
}
return $limitStr?' WHERE '.$limitStr:'';
}
/**
* 设置锁机制
* @access protected
* @return string
*/
protected function parseLock($lock=false) {
if(!$lock) return '';
return ' FOR UPDATE NOWAIT ';
}
}