From ff6d0781d2031c32dbde27e2a2b4e066c9de2ecb Mon Sep 17 00:00:00 2001 From: shish Date: Mon, 6 Aug 2007 23:59:27 +0000 Subject: [PATCH] LIMIT ?,? -> LIMIT ? OFFSET ? -- more compatability git-svn-id: file:///home/shish/svn/shimmie2/trunk@447 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); }