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

fetchColumn is unknown by Phalcon version 1.3.3

The version of Phalcon I am using is 1.3.3

I want to get the number of rows of a table :

function paginationCount($tab){
    $config = array(
                    "host" => "localhost",
                    "dbname" => BDD,
                    "port" => 3306,
                    "username" => "root",
                    "password" => ""
                    );

    $connection = new \Phalcon\Db\Adapter\Pdo\Mysql($config);
    $nb = $connection->fetchColumn("SELECT COUNT(*) FROM ".$tab);
    $connection->close();
    return $nb;
}

At runtime I get an error saying that fetchColumn is unknown ! So how to fix it ?

That method is not implemented in that version of Phalcon



7.2k
edited Sep '15

For which version of Phalcon is it ? My PHP version is 5.4.16 , I use WAMP also ; which version of WAMP should I use also ?