We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Phalcon 1.2 - Paginator\QueryBuilder returns no results

Hello Phalcons.

Before posting an Issue on github I would like to check if I am missing something:

When using the following code

$builder = $this->modelsManager->createBuilder();
$builder->from('Contacts');
$paginator = new \Phalcon\Paginator\Adapter\QueryBuilder(
    array(
        "builder" => $builder,
        "limit"=> 10,
        "page" => 1
    )
);
$result = $paginator->getPaginate();

$result is a stdClass with an empty items property. The query send to the DBMS is correct and all other properties seem to be set correctly.

What do I have to do to make it work?

OK, obviously I'am doing something VERY wrong since noone encountered this problem by now and the C-Sources seem not to have changed since months. Can someone please simply verify that this is working. I'am wrapping my head arround this for hours now.



98.9k

Hi Michael, What database are you using?

Hi.

I hate it when I start bothering harmless people with my incompetence! I just found my database config to blame.

I'am VERY sorry for the noise.



98.9k

No problem Michael, good day/night!