I can't fetch result as column, but if directly use PDO then the result is right. And I got a strange error.
SQLSTATE[HY000]: General error: colno must be an integer
Provide minimal script to reproduce the issue
$list = $this->db
->fetchAll('SELECT id FROM tbl WHERE status = -2', \Phalcon\Db::FETCH_COLUMN);
// or
$result = $this->db->query('SELECT id FROM tbl WHERE status = -2');
$result->setFetchMode(\Phalcon\Db::FETCH_COLUMN);
$list = $result->fetchAll();
Details
- Phalcon version: 3.3.2
- PHP Version: 7.2.3 (https://packages.sury.org/php)
- Operating System: Debian GNU/Linux 9.4 (stretch) x86_64
- Installation type: installing via package manager (https://packagecloud.io/phalcon/stable/debian)
- Zephir version (if any): 0.10.7-2917ebe8ae
- Execute: Cli
- Other related info (Database, table schema): MariaDB 10.1, InnoDB
- Github issue: https://github.com/phalcon/cphalcon/issues/13321