limit results

2 posts by 2 authors in: Forums > CMS Builder
Last Post: April 27, 2011   (RSS)

By zaba - April 27, 2011

Hi I have a list of news stories, which I want to break down into 2 groups, the first being latest which will show the first 8 records, the second archive group will show the second 8 records. the limit code does not work in the same way as mysql limit function. how can i achieve this.

// load records list
list($newsRecords, $newsMetaData) = getRecords(array(
'tableName' => 'news',
'limit' => '8',
'loadUploads' => '0',
'allowSearch' => '0',
));

// load records list archive
list($newsARecords, $newsMetaData) = getRecords(array(
'tableName' => 'news',
'limit' => '8,8',
'loadUploads' => '0',
'allowSearch' => '0',
));