LIMIT ?,? -> LIMIT ? OFFSET ? -- more compatability
git-svn-id: file:///home/shish/svn/shimmie2/trunk@447 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
8f2cf32193
commit
ff6d0781d2
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user