$criteria = new Criteria(); $criteria->setLimit(10); $results = UserQuery::create()->findByCriteria($criteria);
$criteria = new Criteria(); $criteria->setOffset(20)->setLimit(10); $results = ProductQuery::create()->findByCriteria($criteria);In both of the examples above, the setLimit criteria is used to restrict the number of results returned by the query. The package library used in these examples is likely to be Propel, a PHP ORM (Object-Relational Mapping) tool that facilitates database interaction and manipulation in PHP.