Browse Source

Added Absolute value to ricehalla ranking

pull/24/head
Teknikode 5 years ago
parent
commit
236b1d0f5d
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      ricehalla/main.php

+ 1
- 1
ricehalla/main.php View File

@@ -1,5 +1,5 @@
<?php
$Results = $db->select_raw('ricehalla', "INNER JOIN votes ON ricehalla.id=votes.row_id WHERE votes.table_name=? GROUP BY votes.row_id ORDER BY TotalRank DESC, TotalVotes DESC, TotalPoints DESC", array("ricehalla"), 'ricehalla.url, ricehalla.user_id, ricehalla.id, ricehalla.tags, votes.points, votes.user_id, sum(votes.points) as TotalPoints, COUNT(votes.id) as TotalVotes, (sum(votes.points) / COUNT(votes.id)) * sum(votes.points) as TotalRank, ricehalla.date_added');
$Results = $db->select_raw('ricehalla', "INNER JOIN votes ON ricehalla.id=votes.row_id WHERE votes.table_name=? GROUP BY votes.row_id ORDER BY TotalRank DESC, TotalVotes DESC, TotalPoints DESC", array("ricehalla"), 'ricehalla.url, ricehalla.user_id, ricehalla.id, ricehalla.tags, votes.points, votes.user_id, sum(votes.points) as TotalPoints, COUNT(votes.id) as TotalVotes, (sum(votes.points) / COUNT(votes.id)) * abs(sum(votes.points)) as TotalRank, ricehalla.date_added');

$result_list = array();
foreach ($Results as $result)

Loading…
Cancel
Save