com web/master: I misread the schema. arating is the key here.: manage/user-notes.php
| From: | Philip Olson | Date: | Wed, 27 Apr 2016 20:50:28 +0000 |
| Subject: | com web/master: I misread the schema. arating is the key here.: manage/user-notes.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-24696@lists.php.net to get a copy of this message | ||
Commit: 018165652896fa31609c63947165f48275e043f4
Author: philip <philip@roshambo.org> 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