From 5128ad407bbb36e342a59a377f9e012fb4bc31ea Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 26 Dec 2016 15:58:16 +0800 Subject: [PATCH] =?UTF-8?q?withCount=E6=96=B9=E6=B3=95=E7=9A=84=E7=AC=AC?= =?UTF-8?q?=E4=BA=8C=E4=B8=AA=E5=8F=82=E6=95=B0=E9=BB=98=E8=AE=A4=E4=B8=BA?= =?UTF-8?q?true?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index cd7a093b..2f37c000 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -1678,7 +1678,7 @@ class Query * @param bool $subQuery 是否使用子查询 * @return $this */ - public function withCount($relation, $subQuery = false) + public function withCount($relation, $subQuery = true) { if (!$subQuery) { $this->options['with_count'] = $relation;