Question on the request in the construction of the pagination

$users = Users::find(array(
            "order" => "id"
$paginator = new \Phalcon\Paginator\Adapter\Model(
                "data" => $users,
                "limit"=> 10,
                "page" => $currentPage

A query of the form:

SELECT `users`.`id`, `users`.`role`, `users`.`firstname`, `users`.`lastname`, `users`.`email`, `users`.`birthday`, `users`.`sex`, `users`.`username`, `users`.`password`, `users`.`logins`, `users`.`last_login` FROM `users` ORDER BY `users`.`id`

That is no limit to automatically request does not exhibit. Do I need to put in your hand limit? If I have 100,000 users in the database...

edited Mar '14
$builder = $this->modelsManager->createBuilder()

        $paginator = new \Phalcon\Paginator\Adapter\QueryBuilder(array(
            "builder" => $builder,
            "limit"=> 10,
            "page" => 1


You may use "edit" function of the forum... ;)

All is there :

Limit means, how much user you want per page. Then if you have 100 000 users in your DB you will have 10 000 pages