diff options
Diffstat (limited to 'models/comment.php')
-rw-r--r-- | models/comment.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/models/comment.php b/models/comment.php index e0944249..9e5cf8fd 100644 --- a/models/comment.php +++ b/models/comment.php @@ -25,6 +25,14 @@ class Comment extends Base ->findAll(); } + public function count($task_id) + { + return $this->db + ->table(self::TABLE) + ->eq(self::TABLE.'.task_id', $task_id) + ->count(); + } + public function create(array $values) { $values['date'] = time(); |