summaryrefslogtreecommitdiff
path: root/app/Model/ProjectDailySummary.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model/ProjectDailySummary.php')
-rw-r--r--app/Model/ProjectDailySummary.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/Model/ProjectDailySummary.php b/app/Model/ProjectDailySummary.php
index 25a58368..1e28832e 100644
--- a/app/Model/ProjectDailySummary.php
+++ b/app/Model/ProjectDailySummary.php
@@ -72,8 +72,8 @@ class ProjectDailySummary extends Base
public function countDays($project_id, $from, $to)
{
$rq = $this->db->execute(
- 'SELECT COUNT(DISTINCT day) FROM '.self::TABLE.' WHERE day >= ? AND day <= ?',
- array($from, $to)
+ 'SELECT COUNT(DISTINCT day) FROM '.self::TABLE.' WHERE day >= ? AND day <= ? AND project_id=?',
+ array($from, $to, $project_id)
);
return $rq->fetchColumn(0);