public function getTotalPageViews($date = null)
    {
        $db = Database::connection();
        if ($date != null) {
            return $db->fetchColumn('select count(pstID) from PageStatistics where date = ? AND cID = ?', array($date, $this->getCollectionID()));
        } else {
            return $db->fetchColumn('select count(pstID) from PageStatistics where cID = ?', array($this->getCollectionID()));
        }
    }