[$threadId, '=']]); // Assign data if a row was returned if ($threadRow) { $this->id = $threadRow['topic_id']; $this->forum = $threadRow['forum_id']; $this->hidden = $threadRow['topic_hidden']; $this->title = $threadRow['topic_title']; $this->time = $threadRow['topic_time']; $this->timeLimit = $threadRow['topic_time_limit']; $this->views = $threadRow['topic_views']; $this->status = $threadRow['topic_status']; $this->statusChange = $threadRow['topic_status_change']; $this->type = $threadRow['topic_type']; } } // Reply count public function replyCount() { return Database::count('posts', ['topic_id', [$this->id, '=']])[0]; } }