used SQL standard LIMIT/OFFSET, because every database can understand that
This commit is contained in:
parent
63ea2b7c45
commit
1a151ff6f6
@ -74,11 +74,7 @@ class PopularNoticeSection extends NoticeSection
|
||||
$offset = 0;
|
||||
$limit = NOTICES_PER_SECTION + 1;
|
||||
|
||||
if (common_config('db', 'type') == 'pgsql') {
|
||||
$qry .= ' LIMIT ' . $limit . ' OFFSET ' . $offset;
|
||||
} else {
|
||||
$qry .= ' LIMIT ' . $offset . ', ' . $limit;
|
||||
}
|
||||
$qry .= ' LIMIT ' . $limit . ' OFFSET ' . $offset;
|
||||
|
||||
$notice = Memcached_DataObject::cachedQuery('Notice',
|
||||
sprintf($qry, common_config('popular', 'dropoff')),
|
||||
|
Loading…
Reference in New Issue
Block a user