Query 的 delete() 方法使用 fetchSql() 报错

原代码第 `1976` 行 `$this->getRealSql($sql,$this->bind);` 应该修改为 `$this->connection->getRealSql($sql,$this->bind);`
This commit is contained in:
cbwfree
2016-06-14 16:24:52 +08:00
committed by GitHub
parent cf7282d1d9
commit 02595c8350

View File

@@ -1973,7 +1973,7 @@ class Query
$sql = $this->builder()->delete($options);
if($options['fetch_sql']){
// 获取实际执行的SQL语句
return $this->getRealSql($sql,$this->bind);
return $this->connection->getRealSql($sql,$this->bind);
}
// 执行操作
return $this->execute($sql, $this->getBind());