From 2d4294115cf872f402db7c0d83db3c111de0b168 Mon Sep 17 00:00:00 2001 From: shish Date: Tue, 21 Aug 2007 23:46:51 +0000 Subject: [PATCH] does this fix a weird bug o_O git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.1@463 7f39781d-f577-437e-ae19-be835c7a54ca --- core/database.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/database.class.php b/core/database.class.php index 556520fa..3317ce5c 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -271,11 +271,11 @@ class Database { if($limit < 1) $limit = 1; if(count($tags) == 0) { - $result = $this->execute("{$this->get_images} ORDER BY id DESC LIMIT ?,?", array($start, $limit)); + $result = $this->execute("{$this->get_images} ORDER BY id DESC LIMIT ? OFFSET ?", array($limit, $start)); } else { $querylet = $this->build_search_querylet($tags); - $querylet->append(new Querylet("ORDER BY images.id DESC LIMIT ?,?", array($start, $limit))); + $querylet->append(new Querylet("ORDER BY images.id DESC LIMIT ? OFFSET ?", array($limit, $start))); $result = $this->execute($querylet->sql, $querylet->variables); }