修正方法

This commit is contained in:
thinkphp
2016-04-04 22:37:01 +08:00
parent 6e5658b0b9
commit 4b6115d051

View File

@@ -663,7 +663,7 @@ abstract class Driver
* @param mixed $condition 查询条件 * @param mixed $condition 查询条件
* @return Model * @return Model
*/ */
public function or($field, $op = null, $condition = null) public function whereOr($field, $op = null, $condition = null)
{ {
if ($field instanceof \Closure) { if ($field instanceof \Closure) {
$where[] = $field; $where[] = $field;
@@ -1566,7 +1566,8 @@ abstract class Driver
} }
// 执行闭包子查询 // 执行闭包子查询
protected function parseClosure($call,$show=true){ protected function parseClosure($call, $show = true)
{
$class = clone $this; $class = clone $this;
call_user_func_array($call, [ & $class]); call_user_func_array($call, [ & $class]);
return $class->buildSql($show); return $class->buildSql($show);