fix more pairs

This commit is contained in:
Shish 2019-07-07 22:59:22 +01:00
parent 38df37a9aa
commit bcf07946fb

View File

@ -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;
}