From 0dab46114c5be26c9d71af13490734017812c15a Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 9 Dec 2016 11:18:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3HasMany=E5=85=B3=E8=81=94?= =?UTF-8?q?=E7=9A=84has=E5=92=8ChasWhere=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/model/relation/HasMany.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/think/model/relation/HasMany.php b/library/think/model/relation/HasMany.php index 7d73e3a2..298083d4 100644 --- a/library/think/model/relation/HasMany.php +++ b/library/think/model/relation/HasMany.php @@ -182,7 +182,7 @@ class HasMany extends Relation * @param string $id 关联表的统计字段 * @return Query */ - public static function has($model, $operator = '>=', $count = 1, $id = '*') + public function has($model, $operator = '>=', $count = 1, $id = '*') { $table = $this->query->getTable(); return $model->db()->alias('a') @@ -198,7 +198,7 @@ class HasMany extends Relation * @param mixed $where 查询条件(数组或者闭包) * @return Query */ - public static function hasWhere($model, $where = []) + public function hasWhere($model, $where = []) { $table = $this->query->getTable(); if (is_array($where)) {