Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

QueryBuilder does not give desire results

$qBuilder = \Phalcon\Di::getDefault()->get('modelsManager')->createBuilder();

        ->addFrom(NS\Models\Customer', 'c');

    $records = $qBuilder->getQuery()
    $intermediate = $qBuilder->getQuery()->parse();
    $dialect      = \Phalcon\DI::getDefault()->get('db')->getDialect();
    //echo  $sql          = $dialect->select($intermediate);

     it always return 4 results.

     I printed the SQL "SELECT `c`.`customer_id` AS `customer_id` FROM `oc_customer` AS `c` ", it gives 1228 when I run in PHPMYADMIN

     Using phalcon 2.0.9, Xampp on window

     Appericiate if someone can give me any clue on that.


All is working well, I was on wrong DB :-(