for postgres support

git-svn-id: file:///home/shish/svn/shimmie2/trunk@923 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2008-07-24 14:05:40 +00:00
parent 14dc15c7bd
commit 4f020ed7ea

View File

@ -203,9 +203,9 @@ class CommentList extends Extension {
FROM comments FROM comments
GROUP BY image_id GROUP BY image_id
ORDER BY latest DESC ORDER BY latest DESC
LIMIT ?,? LIMIT ? OFFSET ?
"; ";
$result = $database->Execute($get_threads, array($start, $threads_per_page)); $result = $database->Execute($get_threads, array($threads_per_page, $start));
$total_pages = (int)($database->db->GetOne("SELECT COUNT(distinct image_id) AS count FROM comments") / 10); $total_pages = (int)($database->db->GetOne("SELECT COUNT(distinct image_id) AS count FROM comments") / 10);