Commit:    018165652896fa31609c63947165f48275e043f4
Author:    philip <[email protected]>         Wed, 27 Apr 2016 13:50:28 -0700
Parents:   df77530be0cfaf10deafc35f22a997a2eac11f87
Branches:  master

Link:       
http://git.php.net/?p=web/master.git;a=commitdiff;h=018165652896fa31609c63947165f48275e043f4

Log:
I misread the schema. arating is the key here.

Changed paths:
  M  manage/user-notes.php


Diff:
diff --git a/manage/user-notes.php b/manage/user-notes.php
index 1bba609..770b17e 100644
--- a/manage/user-notes.php
+++ b/manage/user-notes.php
@@ -116,7 +116,7 @@ if (!$action) {
                "note.id, note.sect, note.user, note.note, 
UNIX_TIMESTAMP(note.ts) AS ts ".
                "FROM note ".
                "JOIN(votes) ON (note.id = votes.note_id) ".
-               "GROUP BY note.id ORDER BY up DESC, rate DESC, down DESC LIMIT 
$limit, 10";
+               "GROUP BY note.id ORDER BY arating DESC, up DESC, rate DESC, 
down DESC LIMIT $limit, 10";
       /* Bottom rated notes */
       } else if ($type == 4) {
         $sql = "SELECT SUM(votes.vote) AS up, (COUNT(votes.vote) - 
SUM(votes.vote)) AS down, ".
@@ -125,7 +125,7 @@ if (!$action) {
                "note.id, note.sect, note.user, note.note, 
UNIX_TIMESTAMP(note.ts) AS ts ".
                "FROM note ".
                "JOIN(votes) ON (note.id = votes.note_id) ".
-               "GROUP BY note.id ORDER BY up ASC, rate ASC, down DESC LIMIT 
$limit, 10";
+               "GROUP BY note.id ORDER BY arating ASC, up ASC, rate ASC, down 
DESC LIMIT $limit, 10";
       /* Votes table view */
       } else if ($type == 5) {
         $search_votes = true; // set this only to change the output between 
votes table and notes table


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to