com web/master: Fixed search SQL for lowest rated notes. For lowest rated notes we want to sort ascendingly by rating and descendingly by down votes.:
manage/user-notes.php
| From: | Sherif Ramadan | Date: | Tue, 25 Dec 2012 03:23:24 +0000 |
| Subject: | com web/master: Fixed search SQL for lowest rated notes. For lowest rated notes we want to sort ascendingly by rating and descendingly by down votes.: manage/user-notes.php |
||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-15141@lists.php.net to get a copy of this message | ||
Commit: 22207d5f2c253861868b06e97a87658a2e1dc855
Author: Sherif Ramadan <googleguy@php.net> 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