From bcf07946fb3ffaa8c2cafc6371f25e50686ecc0c Mon Sep 17 00:00:00 2001 From: Shish Date: Sun, 7 Jul 2019 22:59:22 +0100 Subject: [PATCH] fix more pairs --- ext/user/main.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ext/user/main.php b/ext/user/main.php index 23369414..b918a845 100644 --- a/ext/user/main.php +++ b/ext/user/main.php @@ -605,12 +605,11 @@ class UserPage extends Extension $rows = $database->get_pairs(" SELECT owner_ip, - COUNT(images.id) AS count, - MAX(posted) AS most_recent + COUNT(images.id) AS count FROM images WHERE owner_id=:id GROUP BY owner_ip - ORDER BY most_recent DESC", ["id"=>$duser->id]); + ORDER BY max(posted) DESC", ["id"=>$duser->id]); return $rows; } @@ -620,12 +619,11 @@ class UserPage extends Extension $rows = $database->get_pairs(" SELECT owner_ip, - COUNT(comments.id) AS count, - MAX(posted) AS most_recent + COUNT(comments.id) AS count FROM comments WHERE owner_id=:id GROUP BY owner_ip - ORDER BY most_recent DESC", ["id"=>$duser->id]); + ORDER BY max(posted) DESC", ["id"=>$duser->id]); return $rows; }