Jump to main content Jump to doc navigation

xPDOQuery::limit

Add a LIMIT/OFFSET clause to the query.

Syntax

API Docs: xPDOQuery::limit()

xPDOQuery limit (integer $limit, [integer $offset = 0])

Example

Get Boxes 11-20, or the 2nd 10 Boxes.

$query = $xpdo->newQuery('Box');
$query->limit(10,10);
$boxes = $xpdo->getCollection('Box',$query);

See Also