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
This commit is contained in:
shish 2007-08-21 23:46:51 +00:00
parent cd2663326f
commit 2d4294115c

View File

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