limit results

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

Re: [zaba] limit results

By Damon - April 27, 2011

Hi zaba,

You can use the 'offset' setting to achieve the results you are after. The "offset" option lets you skip a number of records. Since you want skip the first 8 records, the offset is set to 8 and and the limit is set to 8 to display the next 8 records.

// 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',
'offset' => '8',
'limit' => '8',

'loadUploads' => '0',
'allowSearch' => '0',
));


Here is a also a link to the viewer documentation for reference:
http://www.interactivetools.com/docs/cmsbuilder/viewer_options.html

Give that a try and let me know if that works out!
Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/