mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 07:02:47 +08:00
改进where和whereor闭包查询
This commit is contained in:
@@ -263,6 +263,7 @@ abstract class Builder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$whereStr .= empty($whereStr) ? substr(implode(' ', $str), strlen($key) + 1) : implode(' ', $str);
|
$whereStr .= empty($whereStr) ? substr(implode(' ', $str), strlen($key) + 1) : implode(' ', $str);
|
||||||
}
|
}
|
||||||
return $whereStr;
|
return $whereStr;
|
||||||
|
|||||||
@@ -727,7 +727,7 @@ class Query
|
|||||||
protected function parseWhereExp($operator, $field, $op, $condition, $param = [])
|
protected function parseWhereExp($operator, $field, $op, $condition, $param = [])
|
||||||
{
|
{
|
||||||
if ($field instanceof \Closure) {
|
if ($field instanceof \Closure) {
|
||||||
call_user_func_array($field, [ & $this]);
|
$this->options['where'][$operator][] = $field;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user