mysql 4.x fix
git-svn-id: file:///home/shish/svn/shimmie2/trunk@383 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
77701054ba
commit
2434a6ddb1
@ -282,21 +282,27 @@ class UserPage extends Extension {
|
||||
private function count_upload_ips($duser) {
|
||||
global $database;
|
||||
$rows = $database->db->GetAssoc("
|
||||
SELECT owner_ip, COUNT(images.id) AS count
|
||||
SELECT
|
||||
owner_ip,
|
||||
COUNT(images.id) AS count,
|
||||
MAX(posted) AS most_recent
|
||||
FROM images
|
||||
WHERE owner_id=?
|
||||
GROUP BY owner_ip
|
||||
ORDER BY MAX(posted) DESC", array($duser->id));
|
||||
ORDER BY most_recent DESC", array($duser->id), false, true);
|
||||
return $rows;
|
||||
}
|
||||
private function count_comment_ips($duser) {
|
||||
global $database;
|
||||
$rows = $database->db->GetAssoc("
|
||||
SELECT owner_ip, COUNT(comments.id) AS count
|
||||
SELECT
|
||||
owner_ip,
|
||||
COUNT(images.id) AS count,
|
||||
MAX(posted) AS most_recent
|
||||
FROM comments
|
||||
WHERE owner_id=?
|
||||
GROUP BY owner_ip
|
||||
ORDER BY MAX(posted) DESC", array($duser->id));
|
||||
ORDER BY most_recent DESC", array($duser->id), false, true);
|
||||
return $rows;
|
||||
}
|
||||
// }}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user