Fix some issues

This commit is contained in:
Frédéric Guillot
2014-11-23 18:33:29 -05:00
parent 653ee986db
commit 5d7cff3526
4 changed files with 5 additions and 5 deletions

View File

@@ -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);