Back to PhocaDownloadRate class

Method getVotesStatisticsFile

public static
getVotesStatisticsFile
(mixed $id)

Method getVotesStatisticsFile - Source code

public static function getVotesStatisticsFile($id)
{
    $db = Factory::getDBO();
    $query = 'SELECT vs.count AS count, vs.average AS average' . ' FROM #__phocadownload_file_votes_statistics AS vs' . ' WHERE vs.fileid = ' . (int) $id . ' ORDER BY vs.fileid';
    $db->setQuery($query, 0, 1);
    $votesStatistics = $db->loadObject();
    return $votesStatistics;
}