From 2e7ea6d6abad27b933f4b54dd113bb31adbdd9c6 Mon Sep 17 00:00:00 2001 From: Yuan Chiu Date: Mon, 26 Jan 2015 16:31:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=87learned=5Ftotal=E6=94=B9=E7=82=BA?= =?UTF-8?q?=E5=8D=B3=E4=BD=BF=E6=9C=AA=E6=A8=99=E8=A8=98=E7=82=BA=E9=9B=A2?= =?UTF-8?q?=E9=96=8B=EF=BC=8C=E4=B9=9F=E7=AE=97=E9=80=B2=E5=8E=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/lib/Database/DBStudyActivity.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/lib/Database/DBStudyActivity.php b/htdocs/lib/Database/DBStudyActivity.php index c6bd534..ec607a1 100644 --- a/htdocs/lib/Database/DBStudyActivity.php +++ b/htdocs/lib/Database/DBStudyActivity.php @@ -172,8 +172,7 @@ class DBStudyActivity extends Database { "(SELECT count(DISTINCT `TID`) FROM `".$this->table('Study')."` AS `study` - WHERE `Out_TargetTime` IS NOT NULL - AND `study`.`SaID` = `sa`.`SaID`) AS `LearnedTotal`". + WHERE `study`.`SaID` = `sa`.`SaID`) AS `LearnedTotal`". "FROM `".$this->table('StudyActivity')."` AS sa ". "WHERE ".$where; @@ -754,7 +753,7 @@ SELECT 'study' AS `Type`, `LMode`, `LModeForce`, `MMode`, `EnableVirtual`, '1' AS `Lock`, (SELECT count(`TID`) FROM `".$this->table('TBelong')."` AS `belong` WHERE `belong`.`ThID` = `sa`.`ThID`) AS ` TargetTotal`, -(SELECT count(DISTINCT `TID`) FROM `".$this->table('Study')."` AS `study` WHERE `Out_TargetTime` IS NOT NULL AND `study`.`SaID` = `sa`.`SaID`) AS `LearnedTotal` +(SELECT count(DISTINCT `TID`) FROM `".$this->table('Study')."` AS `study` WHERE `study`.`SaID` = `sa`.`SaID`) AS `LearnedTotal` FROM `".$this->table('StudyActivity')."` AS `sa` LEFT JOIN `".$this->table('Theme')."` AS `th`