$criteria = new Criteria(); $criteria->setStart(0); $criteria->setLimit(10); $users = UserQuery::create()->findByCriteria($criteria); foreach ($users as $user) { echo $user->getName(); }
$criteria = new Criteria(); $criteria->setStart(10); $criteria->setLimit(10); $users = UserQuery::create()->findByCriteria($criteria); foreach ($users as $user) { echo $user->getEmail(); }In this example, setStart(10) sets the starting point to the eleventh row of the table, and setLimit(10) sets the maximum number of rows to be shown on a single page to 10. The findByCriteria() method retrieves the search results and stores them in the $users variable. Package Library: Propel.