Commit:    22207d5f2c253861868b06e97a87658a2e1dc855
Author:    Sherif Ramadan <[email protected]>         Mon, 24 Dec 2012 22:23:24 
-0500
Parents:   f1325b9bbb33478f53167bae42966c3f49f3247c
Branches:  master

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

Log:
Fixed search SQL for lowest rated notes.
For lowest rated notes we want to sort ascendingly by rating and descendingly 
by down votes.

Changed paths:
  M  manage/user-notes.php


Diff:
diff --git a/manage/user-notes.php b/manage/user-notes.php
index 6358291..5a24d1b 100644
--- a/manage/user-notes.php
+++ b/manage/user-notes.php
@@ -140,7 +140,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 rate ASC,up ASC, down ASC LIMIT 
$limit, 10";
+               "GROUP BY note.id ORDER BY rate ASC,up 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